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

Discussion in 'Javascript' started by Amir, May 13, 2004.

  1. Amir

    Amir Guest

    What the for="window" is used for in the <script> tag?
    TIA
    Amir, May 13, 2004
    #1
    1. Advertising

  2. Amir

    Grant Wagner Guest

    Amir wrote:

    > What the for="window" is used for in the <script> tag?
    > TIA


    <url:
    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/script.asp
    />
    specifically:
    <url:
    http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/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 <>

    * Client-side Javascript and Netscape 4 DOM Reference available
    at:
    *
    http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_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-developer/upgrade_2.html
    Grant Wagner, May 14, 2004
    #2
    1. Advertising

  3. Grant Wagner <> 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 -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
    Lasse Reichstein Nielsen, May 14, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Bewley via DotNetMonster.com

    window to window communication (window.opener)

    Andrew Bewley via DotNetMonster.com, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,028
    Andrew Bewley via DotNetMonster.com
    Feb 3, 2005
  2. =?Utf-8?B?UkZTNjY2?=
    Replies:
    7
    Views:
    787
    Patrice
    Oct 28, 2005
  3. Edward
    Replies:
    1
    Views:
    5,795
    ge0rge
    Apr 3, 2006
  4. misterdi
    Replies:
    0
    Views:
    541
    misterdi
    Jul 28, 2009
  5. Jack Whitton
    Replies:
    1
    Views:
    87
    Thomas 'PointedEars' Lahn
    Oct 30, 2003
Loading...

Share This Page