By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,458 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,458 IT Pros & Developers. It's quick & easy.

<script language="JavaScript" for="window">

P: n/a
What the for="window" is used for in the <script> tag?
TIA
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Amir wrote:
What the for="window" is used for in the <script> tag?
TIA


<url:
http://msdn.microsoft.com/workshop/a...cts/script.asp
/>
specifically:
<url:
http://msdn.microsoft.com/workshop/a.../htmlfor_0.asp
/>

Note that "This property is defined in World Wide Web Consortium
(W3C) Document Object Model (DOM) Level 2", however I'm not
certain Gecko-based browsers honor <SCRIPT FOR="..." ..>.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available
at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #2

P: n/a
Grant Wagner <gw*****@agricoreunited.com> writes:
Amir wrote:
What the for="window" is used for in the <script> tag?
Note that "This property is defined in World Wide Web Consortium
(W3C) Document Object Model (DOM) Level 2", however I'm not
certain Gecko-based browsers honor <SCRIPT FOR="..." ..>.


Microsoft is being a little optimistic here. The "for" attribute is
*not* defined in W3C DOM 2 DOM. It is an HTML attribute for label
elements (the associated DOM property is called "htmlFor" since "for"
is a keyword in most languages). There is no "for" attribute for script
tags in HTML, and no similar property on DOM script elements.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.