FOR attribute and EVENT attribuite for the SCRIPT tag

Discussion in 'Javascript' started by Tony, Dec 14, 2006.

  1. Tony

    Tony Guest

    I am looking through MSDN's website on how to stream media and I ran
    accross this example where they had a FOR attribute and an EVENT
    attribute to the SCRIPT tag. Example:

    <script for="Player" event="buffering(start)">
    //...CODE GOES HERE....
    </script>

    I was wondering if that was a Jscript only thing or not. If JavaScript
    can use it then that means I could set a global variable and then have
    my other JavaScript code read that global variable and perform actions
    based on that.

    Also...just a side thought...when you use a piece of code like that
    above does that act as a function so if i declared a variable would be
    in scope with the function or be global?
     
    Tony, Dec 14, 2006
    #1
    1. Advertising

  2. Tony wrote:
    > I am looking through MSDN's website on how to stream media and I ran
    > accross this example where they had a FOR attribute and an EVENT
    > attribute to the SCRIPT tag. Example:
    >
    > <script for="Player" event="buffering(start)">
    > //...CODE GOES HERE....
    > </script>
    >
    > I was wondering if that was a Jscript only thing or not.


    script for event is a Microsoft thing. It is not portable, so avoid it.

    http://javascript.crockford.com/
     
    Douglas Crockford, Dec 14, 2006
    #2
    1. Advertising

  3. Tony

    Tony Guest

    That's what I thought. Well I wonder if jscript and JavaScript can
    share variables?
     
    Tony, Dec 14, 2006
    #3
  4. Tony

    Randy Webb Guest

    Tony said the following on 12/14/2006 4:51 PM:
    > That's what I thought.


    What is what you thought? Please quote what you are replying to. You had
    to trim it all to start with, save yourself the trouble.

    > Well I wonder if jscript and JavaScript can share variables?


    The technical answer is no in the client. And, I will say it before
    someone else does - jscript on the server can "share" variables with
    javascript in the client.

    Your question seems to imply that you think both JScript and Javascript
    run in the browser at the same time and they don't.

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Dec 14, 2006
    #4
  5. Tony

    Tony Guest

    What I meant by that's what I thought was that the for and event
    attribute was only a JScript thing. I was also thinking that I could
    have a <script> block that was javascript and another <script> block
    that was jscript.

    What I'm wanting to do is read the buffering state off of a windows
    media player file and then enable features based on if the file is
    finishe buffering as is ready to play.


    Randy Webb wrote:
    > Tony said the following on 12/14/2006 4:51 PM:
    > > That's what I thought.

    >
    > What is what you thought? Please quote what you are replying to. You had
    > to trim it all to start with, save yourself the trouble.
    >
    > > Well I wonder if jscript and JavaScript can share variables?

    >
    > The technical answer is no in the client. And, I will say it before
    > someone else does - jscript on the server can "share" variables with
    > javascript in the client.
    >
    > Your question seems to imply that you think both JScript and Javascript
    > run in the browser at the same time and they don't.
    >
    > --
    > Randy
    > Chance Favors The Prepared Mind
    > comp.lang.javascript FAQ - http://jibbering.com/faq
    > Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Tony, Dec 14, 2006
    #5
    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. shruds
    Replies:
    1
    Views:
    967
    John C. Bollinger
    Jan 27, 2006
  2. kanpeter
    Replies:
    0
    Views:
    1,346
    kanpeter
    Oct 26, 2010
  3. dkmd_nielsen
    Replies:
    6
    Views:
    259
    Joel VanderWerf
    Nov 26, 2008
  4. George Hester
    Replies:
    4
    Views:
    92
    Laurent Bugnion
    Dec 16, 2004
  5. kal

    script functions in <script> tag

    kal, Aug 6, 2007, in forum: Javascript
    Replies:
    3
    Views:
    92
Loading...

Share This Page