![](https://secure.gravatar.com/avatar/06aacb2f1dbed200347db0a003fc6179?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
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>
>