html

Need help preforming an XSL Transform from XML to HTML in ASP.NET MVC

I just learned about XSL and XSLT a few days ago and now I'm trying to put it to work based on a question I had earlier today (want to have formated XML displayed on my website). Here is the code I'm trying (in a View): XDocument xmlInput = XDocument.Parse(item.Action); XDocument htmlOutput = new XDocument(); using (System.Xml.XmlWrit...

What is a neat way to vertically decrease opacity in a group of paragraphs of text in HTML

I am writing an application in rails. I have multiple paragraphs of dynamic text which are listed vertically. I am looking at neat way through javascript or CSS to vertically increase opacity of the group of paragraphs so the body of text has the appearance if disappearing as you go down the page. <p>Some text obviously more than i am...

php class for creating form interfaces to database tables

I often need to create html admin interfaces to administer data in tables. In other words, a page that lists all the records and lets you step through multiple pages of records, and perhaps sort or search them, along with the ability to add or delete a record, or update an existing one. Basic stuff. I do not like to use big frameworks ...

How to declare global var in javascript and HTML?

How to declare a variable, I think global, the way I declare in an html file and then use it in a js file (included by <script> tags)? ...

mixing static html pages and JSPs

Hi, I ran into something that I never thought of before and it stumped me. I have a site done using servlets and JSPs. There is an auth mechanism that works well and is much liked. There is now the need to add a static directory containing static HTML pages under the same umbrella. The requirement is that these pages should not be con...

How to add padding to bottom of site containing a floated img?

I'm building a webpage which has an 'img' floated within a div as the lowest element displayed on page. The page ends abruptly at the bottom of the image. For nice aesthetics I would like the user to be able to scroll to just beyond the image (20px or so). I have attempted to apply margin-bottom and padding-bottom to both the body, a ...

Generate PDF file from HTML page while on shared hosting

I have very limited access to enable extensions etc on my hosting but am looking to generate a PDF from an HTML page (with css/images) through PHP. Any ideas how I can achieve this with next to zero CL access etc? Preferable not a "hack" / relient on a service (as I'll be looking to use this long term). ...

How to calculate the XPath position of an element using Javascript?

Let's say I have a large HTML file with different kinds of tags, similar to the StackOverflow one you're looking at right now. Now let's say you click an element on the page, what would the Javascript function look like that calculates the most basic XPath that refers to that specific element? I know there are an infinite ways of refer...

css position need help

html <div class="navigation"> <a class="active" href="index.html">1</a> <a href="index.html">2</a> <a href="index.html">3</a> <a href="index.html">4</a> </div> CSS .navigation { float: left; height: 160px; position: relative; width: 24px; } .navigation a { display: block; } Can anyone help me how to make <...

how to convert html to epub?

Can I do this conversion with any programming language or library? ...

what technology is behind soccernet gamecast?

I am looking at JavaFX to create RIA. and technology behind partial refresh and news feed, anything that can update and display new information real time. anyone knows anything behind the technology of soccernet gamecast? ...

How are PDF sizes specified?

I am generating a PDF from HTML using a library, and all the size parameters that I am giving are in pixels. This seems kind of odd. I just googled the internet for A4 size in pixels, and can I just use these values everywhere? Is this how it should be done? Will the generated PDF look correctly? Otherwise, do I need to somehow compute...

How can I center an element in IE while using the html5 doctype?

<!DOCTYPE html> <html land="en"> <head> <title></title> <style> #container { margin: 0 auto; width: 960px; } </style> </head> <body> <div id="container"></div> </body> </html> How can I get this to work in Internet Explorer without changing the doctype? ...

How to attach both an onclick() and href to an <a> element, but only have one work at once

Hi, I have an element like so: <a class='link' href='/page1'>Page 1</a> It has a click handler attached like so: $('.link').click(function() { loadPage('page1'); }); When the link is clicked, the new page loads. However, there are two ways of loading the new page. One is via AJAX, which figures out which elements have changed betwee...

How to fetch the GET/POST elements in a form without knowing the name of the controls inside the form

I had the list of items. When the user clicks a item, a div is generated with a textbox <input type="text" name="(DYNAMICALLY ASSIGNED VALUE)" /> So user can select multiple items. For each item a textbox is generated dynamically inside the form. When the user clicks the submit button, i want to fetch the GET/POSTED elements. How can we...

TreeView — selected node style doesn't appears to selected node

My code is : <asp:TreeView ID="TreeViewCategories" runat="server" ExpandDepth="0" Style="min-height: 200px; max-height: 500px;" LineImagesFolder="~/TreeLineImages" NodeIndent="0" LeafNodeStyle-CssClass="LeafNodesStyle" CssClass="TreeView" NodeStyle-CssClass="NodeStyle" ParentNodeStyle-CssClass...

How to give fix width to <td>??

Hi, since I am generating data dynamically..adding <tr> and <td> in it, the <td>s are generate according to data count,and according to setting in each row only 2 data can be display. each cell is given width 50% The problem is if the data count is odd for example 3 the first row and its cells generate perfectly..but in the next row ...

how to dynamically display image in <li> coming from database?

hi Pros, how can i dynamically display my images coming from database? I'll be using a the image inside a list <ul> <li> <asp:Image id="image1" runat="server" ImageUrl=""/> </li> </ul> I'm using C# on my code behind. I already created a method to display images but i dont know how can i use my method inside the list and i...

How to resolve this eror - there is no attribute "onFocus"

Hello.. I am getting an error called there is no attribute "onFocus". I have a code as follows: <input name="name" id="name" class="small required name" type="text" value="Name:" onFocus="if(this.value='Name:'){this.value=''}" /> I tried validating my site in http://validator.w3.org/, and I got these errors. Can anyone help me to resol...

Extracting text from a contentEditable div

I have a div set to contentEditable and styled with "white-space:pre" so it keeps things like linebreaks. In Safari, FF and IE, the div pretty much looks and works the same. All is well. What I want to do is extract the text from this div, but in such a way that will not lose the formatting -- specifically, the line breaks. We are using...