html

How to pass text in a textbox to javascript function?

Suppose I have the following HTML code, how can I pass the user's input to execute(str) javascript function as an argument? <body> <input name="textbox1" type="text" /> <input name="buttonExecute" onclick="execute(//send the user's input in textbox1 to this function//)" type="button" value="Execute" /> </body> ...

preload an animated gif

Hi, I have a feature where a user can click a video thumbnail and my php script will go grab the video. I have a div which is display: none; containing the flash video player code and its background image is the animated gif (a loading spinner) in the css. I use the jquery show method to make it appear when the user clicks it. But whe...

Prompting user to save when they leave a page

I need to prompt a user to save their work when they leave a page. I've tried onbeforeunload but I need to show a styled prompt not the usual dialog box. Facebook has managed to achieve this (if you have a Facebook account, edit your profile info and go to another page without saving and you get a styled prompt). I've also tried jquery u...

Is it possible to separate totally the HTML/CSS layout from the GWT logic?

I'd like to allow our web developers to continue to work in pure HTML and to let developers to write GWT Java-only code to write the rest of the business logic. Is it even possible? Have anyone tried to work with the web developers in the GWT environment? How do you incorporate the web developers into the GWT development process? ...

Adding SWF to HTML based AIR App

Hi, I have a little HTML based Adobe AIR project I'm playing with and I'd like to add an existing SWF to the project. Now, I can see it running via the trace/log messages coming through from the SWF, but I can't seem to call any function within the SWF. I've read that the ExternalInterface function isn't available within the Air cont...

Including an image in a firefox extension

Hey, I would like to use an image in firefox extension I am developing. Can someone tell me how to include the image. I used the following but it did not work. var divTag = content.document.createElement("img"); divTag.id = "div1"; divTag.src="chrome://ff_extension/content/image1.gif"; divTag.setAttribute("align","center"); ...

Using an HTML snippet for a template in JavaScript (jQuery)

I currently am working on a little app that requests user info from my server and displays them using a special template. At first, I just hardcoded the little snippet in jQuery: $("<li><div class='outer'><table><tr><td rowspan=2 class='imgcontainer'><img class='thumb'/></td><td><span class='username'/></td></tr><tr><td><span class='n...

populating a text area/field with existing data

I have a page to edit user information, and I wish to show the current information and allow it for editing, to avoid overwriting existing information. At the moment, I am fetching the data and displaying it in a text area like so: $usernameQuery = "select username, firstname from USERS where username = '" . $con->escape_string($userna...

nice html reports for pyunit

Do you know a tool for creating nice html reports for pyunit? ...

Why is IE ignoring cell's widths when a collspan is involved?

Consider this (snipped) example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt;&gt; <body> <table style="background-color: Navy; width:400px"> <tr> <td style="background-color: Green; width:35px">test</...

round corners and color border on html form elements

how can i make cool checkbox and selectbox elements in html form , that work in IE too ? ...

Do different browsers (Firefox/Safari/IE/Opera) have limits on the form elements name attributes?

Do different browsers (Firefox/Safari/IE/Opera) have different limits on the length of the "name" attribute of form elements? <input name='a012345678901234567890123456789012345678901234567890123456789 ...'> ...

Why does my CSS (apparantly) force a scrollbar to appear regardless of content size?

I apologize for the long paste of code here, but this has been bugging me for a good few hours now. I'm working on porting my entire site over into a new template, and I'm trying to make the various areas and things more size-aware so I can contain most of them in resizeable dockable windows and things, a very neat concept that's working...

PHP "pretty print" HTML (not Tidy)

I'm using the DOM extension in PHP to build some HTML documents, and I want the output to be formatted nicely (with new lines and indentation) so that it's readable, however, from the many tests I've done: "formatOutput = true" doesn't work at all with saveHTML(), only saveXML() Even if I used saveXML(), it still only works on elements...

Do hashes in URLs affect SEO?

If I've got 2 (or more) URLs (where the only difference is the hash value) to my homepage will Google divide my page rank between those pages or is it 'safe' to have lots of different hashes in the URL and still keep one page rank? Example: http://example.com/ http://example.com/#hash ...

Flash file Link

Hi, I have a flash file menu i am having problem while link it to my other web pages the code is below. <div id="flashcontent"> <a href="http://www.Yahoo.com.com"&gt;Home&lt;/a&gt;| <a href="http://www.gmail.com"&gt;Products&lt;/a&gt;| <a href="Home.htm">Downloads</a>| <script type="text/javascript"> var so = new SWFObject("10.swf","10...

gadget / widget manager

Does anybody know of any pre-canned gadget/widget management framework (along the lines of iGoogle etc) that I would be able to use on an ASP.NET MVC site (presumably loading divs via jQuery etc)? In particular, I'd rather not write all the selection / location code if there is something decent already available. (I would expect to writ...

PHP library for converting HTML4 to XHTML?

I need to convert HTML4 input to valid XHTML (strict) in PHP5 for further processing (SAX for instance). Any suggestions? ...

Handling a (possibly paginated) list of items, like to toggle a value based on a single click?

Assuming of course we're working with HTML Forms and GET/POST data, backend language agnostic. Asker is most fluent with PHP and Python. Example: Tracking event attendance, there is an HTML page for the event administration that lists all available People. There is a column next to each name with a graphic/widget representing their at...

How do I tell if an HTML element has gone off the bottom of a page?

I have a system that takes dynamic data, puts it in HTML for layout and then converts that to PDF. However the problem I am having is that if an element becomes too big for the remaining page space or pushes something else off the bottom how can I detect this and move the element myself to the right position on the next page? (Currently ...