html

Return Key: How to focus the right form

Hi, I have more than one form on the same page: I would like to know if there is any way I can submit the right form when the user press the "return keyboard key" ? Thanks ...

jQuery Autocomplete not working for Dynamic Form Fields

Hey folks... I am back with another issue... I am using jquery Autocomplete on a form field. It works! The issue is, then dynamically I add another row to the form, it doesn't. Yes, I keep toggle the id of the new field to a new one. Original = exampassed1 Dynamically Added = exampassed2, exampassed3 and so on... I have already add...

How to set an ID on the target of an HTML form

I need to set a window.id on the target of an HTML form. The motivation is for Selenium automation tests. How would I access this window? ...

Newline differences in c# vs. JS/HTML

If I have a textarea and I put in a newline, FireFox and IE 7/8 seem to store that as "\n". (i.e. if I do val.match(/\n/) it finds something, but val.match(/\r/) finds nothing) C# of course represents newlines as "\r\n". This leads to problems when we have maximum length restrictions, since every newline is counted as one character in th...

css: inline-block element with no text renders differently

example here: http://demo.cybercsi.com/tests/InlineBlock.html code: <div style="background-color:red"> <div style="display:inline-block;background-color:green;height:20px;width:20px;"></div> </div> <div style="background-color:yellow"> <div style="display:inline-block;background-color:green;height:20px;width:20px;">hi</div> </div> Wh...

alternating colors in table in jsp using css

Possible Duplicates: How to alternate HTML table row colors using JSP? Table row - Giving alternate colors can any one provide basic code for dynamically adding rows in a table with alternate colors using css in jsp file kindly provide this code ...

How to dynamically piece page elements together to form a square?

I have a number of items with different values. I'd like to represent each item as a square with its size corresponding to its value, where each square is a component of a larger square. All the squares of different sizes fit together to make a larger, perfect square. Is it possible to do something like this with HTML/CSS? Does anyone k...

Where is the HTML5 Document Type Definition?

The "old" HTML/XHTML standards have a DTD (Document Type Definition) defined for them: HTML 4.01 http://www.w3.org/TR/html401/sgml/dtd.html XHTML 1.0 http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict This DTDs specify the rules for nesting elements - "which types of elements may appear in which types of elements". I made a...

Ensure line between two divs in larger div extends all the way to the bottom of the parent div

I have two divs placed inside a larger div. Each one of these two divs contains dynamically generated content and thus their heights vary, so I cannot know which one of the two will be taller. The parent div they are placed in has a 1px border and I would like to have 1px line between these divs as well, so that the line extends all the...

How to update DIV content in Firefox using Javascript?

Hi I have this code in javascript to show time in div and update it: if (!document.all) return var Digital=new Date() var hours=Digital.getHours() var minutes=Digital.getMinutes() var seconds=Digital.getSeconds() var dn="AM" if (hours>12){ dn="PM" hours=hours-12 } if (hours==0) hours=12 if (minutes...

Need to display an html page triggered by a list item in the left 'div' in the center 'div'

I have a menu of list items in the left 'div' of my web page. I am currently selecting one of the list items and opening a new web page. I would like to have the content displayed in my center 'div' when the list item in the left 'div' is selected. How can I accomplish this? I have the list items in 'col2' (on the left) and I'm posti...

header and footer that always appear at top and complete bottom

I know I can just use a master page, but what markup do I use on the master page to always have a header at the top and a footer all the way at the bottom using some CSS code? ...

jQuery / AJAX - response format

Hi I was wondering what's the best "format" for the data that gets sent back to the javascript to be in? When should I use a JSON string or just plain HTML? Are there any other options besides these two? ...

Floating div issue

Hi, I have an issue with floating divs. I have a container st to fixed width, and I have child elements inside that which are all div elements. What I want is that, I need two elements to be shown in a row. The code that I wrote is as follows. CSS #container { width: 400px; } .item1 { width: 180px; ...

multiple instances same data url image

How do you re-instantiate an already declared base64 data url image without having to re-insert the base64 code on the same page?(preferably with css) I tried: <html><head> <style type="text/css"> img.wink { width:15px; height:15px; src:"data:image/.gif;base64,R0lGODlhDwAPALMMAP/qAEVFRQAAAP/OAP/JAP6dAP+0AP/+k//9...

HTML - How to pre-populate form field with known value upon load?

I have this web page, say Home.html, that has links to other employee-related web sites. There is one, say www.SomeSite.com/HR.xyz, where it has a form to login. There are 3 fields: UserId, Password, and Company. The company is always the same, e.g. MyCo. How can I update the Home.html page so that when the user clicks on the link to...

How to prevent search engines from indexing a single page of my website?

I don't want the search engines to index my imprint page. How could I do that? ...

Appending Iframe to Particular Place in HTML Using Jquery

Hi all, I'm trying to place the following DOM generated iframe into a certain part of the page. In particular I want it to sit inside a div I have name "maps". Right now it's floating all the way to the bottom of the page probably because it's being placed there. Is there a way to find the div called maps and place it right after that di...

IE8 is returning NULL when selecting from jQuery + AJAX request

I have no idea why this is happening. First off, the code is valid via W3C validator as HTML5 EXCEPT for URL encoding issues (like & should be & amp;) but i don't have control over that and that shouldn't cause this error anyways. Second, this works in all other browsers. Third, the "data" element you'll see in the JS below returns the...

Max size for background image CSS

I have a 70 by 50 px box and I have various images, (SVG files, so no size) I want to keep their aspect ratio, but some images are portrait and some are landscape sized. So I can do: background-size: 70px auto; and that will work for all the landscape icons. But it will stretch the portrait images and make them taller, so they will st...