Recent Notes

Displaying keyword search results 1 - 9
Created by James on February 02, 2012 09:20:22    Last update: February 02, 2012 09:20:22
This example came from the jQuery validation documentation. The required rule can be used to validate a required selection box when you set the value of the first option to empty. <!DOCTYPE HTML> <html> <head> <scrip... The error message is the title since no error message is specified. A more fully defined validation check would look like this: $('#my-form').validate({ errorElement: "p", ...
Created by James on September 23, 2010 20:30:55    Last update: November 16, 2011 14:51:23
jQuery button set where one button can be pressed "down" at a time. <!DOCTYPE html> <html> <head> <title>jQu...
Created by James on September 28, 2010 18:57:58    Last update: January 11, 2011 20:35:02
Test page to demo that preventDefault works perfectly for a text input but fails for select , even though the event is cancelable: <!DOCTYPE html> <html> <head> <title>Pre...
Created by Dr. Xi on October 03, 2008 02:36:41    Last update: January 11, 2011 19:53:25
Demo page to retrieve the value and text of a dropdown box using JavaScript. <html> <head> <script language="JavaScript" ...
Created by Dr. Xi on November 18, 2009 22:53:33    Last update: November 18, 2009 22:56:17
The "View Source" function in browsers displays the HTML source as it is received from the server. It does not show the HTML source after the DOM structure has been altered by JavaScript. Sometimes you want to see the HTML source as it is currently rendered in the browser. For Firefox: Without using any extension: select an area of the page, right click and select "View Selection Source" Using Firebug : click the HTML tab double click the body tag to edit copy all text in the edit panel and paste to your favorite editor. Using View Source Chart : right click and select "View Source Chart" For IE: Use View Rendered Source by Bill Friedrich: right click and select "View Rendered Source" For all...
Created by Dr. Xi on October 04, 2008 03:29:55    Last update: October 04, 2008 04:26:40
<html> <body> <script language="JavaScript" ...
Created by Dr. Xi on September 17, 2008 02:56:09    Last update: September 23, 2008 02:46:03
When a page is in a standalone window, window.focus() brings that page to the front. With tabbed browsing (in either IE, or Firefox), a popup window may be opened in a new tab. In that case, window.focus() has no effect. For testing purposes, this is the parent page: <html> <body> <script language="JavaScript"... and the popup page: <html> <body> <h2>The Popup</h2> </body>... I haven't found a solution to this when the popup is displayed in a tab. However, you can configure the browser so that it displays popups in a new window instead of a new tab. For IE, open up " Internet Options ", on the general tab under the " Tabs " section, click " Settings ". Under "When a popup is encountered", check...
Created by Dr. Xi on September 07, 2008 22:10:21    Last update: September 07, 2008 22:15:51
When you use window.open to open a page in a new browser window, the new window is not modal, i.e., focus on the new window can be lost when the parent window is clicked. IE provides window.showModalDialog but it doesn't have the full power of a real browser window, and it's IE specific. This is a JavaScript that makes the popup window modal. The central trick is to check focus periodically with window.setInterval and request focus when it's lost. In IE, when an input on the page gets focus, the window thinks that it lost focus and requests focus back, thus taking focus away from any input fields - making it impossible to enter data into input fields in the modal dialog. This problem is...
Created by Dr. Xi on August 10, 2007 21:05:26    Last update: August 10, 2007 21:05:26
This style sheet transforms the struts-config.xml into HTML for easy viewing in a browser. It uses the DHTML JavaScript tooltip from http://www.walterzorn.com/tooltip/tooltip_e.htm . <?xml version="1.0" encoding="UTF-8"?> <xsl...