html

How can I find out which text area in my form is in focus?

Hi I want to prevent users from using the enter key unless they are in a specific text area on my form . I can stop the enter button being used but how can I find out which part of my form is in focus using js ? Any help would be great , thanks ...

Is there a cross-browser way to stop HTML form elements from overlapping their containers?

About a year ago, a question was asked on stackoverflow about how to horizontally align input and textarea elements: http://stackoverflow.com/questions/1482848/input-width-vs-textarea-width I have some HTML + CSS where I am trying to do precisely this, but I find that no matter what combination of CSS reset and precise, pixel-based widt...

Embedding a song on a web site

I am trying to embed this song (http://radio3.cbc.ca/play/hdmdc/playlist/Week-1) (shortened link: http://r3.ca/09bP) on my web page but I can't get a code that actually works. (This is the only web site I can find this song on). Help me! ...

Form onSubmit determine which submit button was pressed.

I have a form with two submit buttons and some code: HTML: <input type="submit" name="save" value="Save" /> <input type="submit" name="saveAndAdd" value="Save and add another" /> Javascript: form.onSubmit = function(evnt) { // Do some asyncrhnous stuff, that will later on submit the form return false; } Of course the two subm...

Need a regular expression to parse HTML tags

Hi, Regular expressions are not my forte and could really do with assistance on matching and replacing the following: In a HTML file I have many instances of HTML like this: <font class=font8>text text text</font> The font tag can have different content in either single word or multiple word with spaces and maybe numbers. I need to...

characters not allowed in DOM ids by spec, and by browser

The following question is a good rundown on what the spec says about the contents of the id attribute: http://stackoverflow.com/questions/1077084/what-characters-are-allowed-in-dom-ids my question is, how well do browsers adhere to this spec? I am pretty sure that i can use all numeric ids in firefox for example. ...

Problem in displaying dropdown box

<html> <head> <title>ADD URL Sources</title> </head> <body> <form action="Test1.jsp" method="post"> <br><br><select name="source" onchange=""> <option value="rss">RSS LINK</option> <option value="other">OTHER LINK</option> </select> <br><br> Enter URL to be added <input type="text" name="url" size=50> <br/><br>Enter the ...

is it possible to insert a line break in this tooltip?

i have a pretty map of the US: http://upload.wikimedia.org/wikipedia/commons/a/a5/Map_of_USA_with_state_names.svg i would like to implement a tooltip with multiline functionality such as here over the red square: http://www.carto.net/papers/svg/gui/tooltips/ please help me get started on this. i will be offering a maximum bounty on t...

help needed with quick IE7 CSS z-index problem...

I'm stuck on an ie7 css curiousity... try typing something in the search box (on ie7) ont eh below page, the z-index doesn't seem to be working like it does for other pop-up type elements on the same page. http://bit.ly/cPzgom I usually try to avoid instance-specific questions like this but it's got me really frustrated! thanks! ...

Why won't my Javascript functions work?

Hi guys, I'm trying to edit this JQuery code to work with a PHP, but for some reason, the javascript is not working properly. This is the javascript: function sel(x){ $(this).stop().animate({height:x},{queue:false, duration:600, easing: 'easeOutBounce'}) } function desel(){ $(this).stop().animate({height:'50px'},{queue:false, d...

Chinese text not displaying properly on web page

I am adding some Chinese text to a primarily English web page and am having trouble getting the characters to display properly. I've got the encoding set to UTF-8 in the meta content type tag, and I am copying/pasting the Chinese I was sent from a Word document. The text is still rendering as follows: 繁體中文版 rather than in Chi...

How many external style-sheets are required for cross browser compatibility?

I have just started web development after a few years. Mostly in the past I would specify a style-sheet dedicated to IE6. Now, Chrome and Safari seem to be rendering elements better, over FireFox. What is standard procedure for external style-sheets these days? IE6 (STILL?) - IE8? FF even? It would be greatly appreciated if anyone has...

prettyPhoto Loading Photos in Reverse

For some reasons, unknown to me, prettyPhoto is loading images in reverse. It opens the last picture first and then as you can guess, you're given the option to see the previous photo all the way back to the first photo. I've setup prettyPhoto according to the documentation however I'm not getting the desired effect. Not sure what I'm do...

How to write marketplace web project documentation?

When creating web projects (mostly XHTML/WORDPRESS THEMES) for sale on any given marketplace, what is the best way to go about writing technical manuals for users? ...

jQuery returning the number (eq) of a clicked div

So I'm building a jQuery plugin for a project that allows the client to create multiple jQuery scrollers per page -- I'm focusing strictly on the front end for this question. On document ready, it will tell the slider div to initialize. This then takes the number of images in the slider, and creates a little circle button for each image...

CSS - Center Footer Content

Hi guys, I need to center my footers content and I can not make it works. I am centering my page using: #wrap {width: 960px;margin: 0 auto;} I have used float:left; float:right; in my header and content. So, I try to center my footers content making use of: #footer {height:0 auto;min-width:960px;float:left;} div.inner_footer {heigh...

Run a perl script on web site page load

I have a page that when loaded I would like it to run a perl script. Is this possible to do with javascript? I have never ran a perl script on the web before and the only way I have seen to do it is link to it. ...

How to change the target frame of a web response

Is it possible to change the target frame in my web response? I make a request with target=_parent, but depending on how that request is processed I would like to change the target frame. Is there something I can set on my HttpServletResponse to change the target frame? ...

Using Jquery to parse html of a webpage, modify it, then reinsert it into webpage

Hi. I currently am trying to add tags around certain words in a webpage. This webpage can have many different id's, classes, and names, so it's important that if I'm trying to put a span around "foo" I do the following: <p class='foo'>blah blah blah foo blah blah blah </p> changes into <p class='foo'>blah blah blah <span class='ba...

JQuery scroller to load dynamic data via ajax

Currently I'm using a marquee html tag to scroll data within a div tag eg <marquee align="Top" direction="up" loop="-10" scrollamount="2" scrolldelay="100" style="height: 100px; padding-right: 5px;" onmouseover="this.stop()" onmouseout="this.start()" width="100%">DATA COMES HERE</marquee> What I want is the same effect only I want to d...