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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amir

    #1

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

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


  • Grant Wagner

    #2
    Re: &lt;script language=&quot; JavaScript&quot ; for=&quot;windo w&quot;&gt;

    Amir wrote:
    [color=blue]
    > What the for="window" is used for in the <script> tag?
    > TIA[/color]

    <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 <gwagner@agrico reunited.com>

    * Client-side Javascript and Netscape 4 DOM Reference available
    at:
    *


    * 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


    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: &lt;script language=&quot; JavaScript&quot ; for=&quot;windo w&quot;&gt;

      Grant Wagner <gwagner@agrico reunited.com> writes:
      [color=blue]
      > Amir wrote:
      >[color=green]
      >> What the for="window" is used for in the <script> tag?[/color][/color]
      [color=blue]
      > 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="..." ..>.[/color]

      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 - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      Working...