Recent Notes

Displaying keyword search results 1 - 2
Created by James on May 24, 2009 20:14:25    Last update: January 11, 2011 20:07:38
In the following HTML code, I attached an inline handler to the text field input and added two event handlers with addEventListener / attachEvent . Both IE and Firefox called the inline handler first. But the order in which the added event handlers were called are different between IE and Firefox (IE calls attached_click2 first). Further, if I add the same event handler multiple times, IE calls the handler the same number of times. But Firefox only calls the same handler once, no matter how many times it was added. <html> <body> <form> Input: <input type="... You can attach an event handler to an HTML element either inline , with JavaScript , or by calling addEventListener (DOM level 2), or attachEvent (IE specific). When you...
Created by Dr. Xi on August 10, 2007 20:43:10    Last update: August 10, 2007 20:43:10
IE and firefox both support client side XSLT. This can be done by inserting an xml-stylesheet into the XML file, which would trigger the browser to apply the XSL to the XML document and generate a transformed page: <?xml version="1.0" encoding="utf-8" ?> <?... Or, it can be done more dynamically with client side JavaScript. However, IE and FF offer different APIs for XSLT. Below is my attempt to bridge the differences. It's been tested to work for IE 7.0, FF 2.0 and Opera 9.0.2. function XSLT(url) { var xslt = false; ... The following HTML page shows how to use it: <HTML> <HEAD> <SCRIPT language="JavaS...