FOR attribute and EVENT attribuite for the SCRIPT tag

T

Tony

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?
 
D

Douglas Crockford

Tony said:
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/
 
R

Randy Webb

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.
 
T

Tony

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top