
window.onload = function()
I have searched, read, and tried multiple variations, all with no luck. I Can't use the onLoad in the <body> tag so I have to use the window.onload. Code attached below, if the function is called in the body tag it all works fine. If I try the other way nothing comes up. I'm sure its a simple issue I'm overlooking and thats why I'm here...
<
<head>
<script type="text/javascript" src="/Scripts/swfobject-2.1.js"></script>
<script type="text/javascript">
// <![CDATA[
function createPlayer(theFile) {
var flashvars = {
file:theFile,
autostart:"true",
playlistsize:"250",
playlist:"bottom"
}
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
}
var attributes = {
id:"player1",
name:"player1"
}
swfobject.embedSWF("/video/player.swf", "placeholder1", "640", "600", "9.0.115", true, flashvars, params, attributes);
}
// ]]>
window.onload = function() { createplayer('/video/mrss_euphoriaSpeakers.xml'); }
</script>
</head>
<!--<body onload="createPlayer('/video/mrss_euphoriaSpeakers.xml')"> -->
<body>
<div id="wrapper">
<div id="placeholder1"></div>
</div>
</body>
</html>
>