Windows Media Player SDK banner art
PreviousNext

Calling Functions

If you need to call more than a few lines of code, you can load a script file using the scriptFile attribute of the VIEW element, and call the functions in the script. You can load more than one file per view; for example:

scriptFile = "myfile1.js ; myfile2.js ; myfile3"

After the script files are loaded, you can call functions in them from inside your View section. For example, to call a function called myfunction when something is clicked, type:

onclick = "JScript: myfunction()"

Note   If you have more than one view, only the functions in files loaded into the current view are available to the XML and JScript code running with the current view. Files loaded in other views are not in scope with the current view.

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.