As with most things Javascript, you can do anything including creating a script element in the parent window. Here's how:
- Make your script object
- Set its onload(), very handy for utilizing callback functions
- Set the scripts source
- Attach the script to the document
The script tag's type is defaulted to Javascript thanks to HTML5. Lastly you can remove the script tag from the window by calling "removeChild(scriptObj);" if your worried about such things.
You're done now! Global attributes from the included Javascript are now within your current global scope.
You're done now! Global attributes from the included Javascript are now within your current global scope.
No comments:
Post a Comment