|
-
Oct 30th, 2012, 02:53 PM
#1
Thread Starter
Hyperactive Member
Can anyone help make my scripts IE friendly? (JavaScript)
I have a few related custom scripts I've written that work perfectly in Firefox and Chrome. I need to try and get them working in IE as well. Any insight what I need to change and why would be greaetly appreciated. This is the first script:
Code:
<script type="text/javascript">
function getJs(src, callback) {
if (src && typeof src === "string") {
var el = document.createElement("script");
el.type = "text/javascript";
el.src = src;
document.head.appendChild(el);
el.onload = function(e) {
(callback && callback instanceof Function) ? callback(e) : void(0);
}
}
}
function DelayExecute() {
setTimeout( function(){addVideoRows()}, 2000 );
}
ScriptURL = "http://www.upmygame2.com/getAthleteVideos.do?athleteId="+ProfileID+"&alias=demo";
getJs(ScriptURL); DelayExecute();
function addVideoRows() {
var ListHTML="";
for (var i = 0; i < umgVideos.length; i++) {
ListHTML += "<p><b>"+umgVideos[i].uploadDate + " — <a href='/player?videoid=" + umgVideos[i].id +"'>" + umgVideos[i].title + "<\/a><\/b><br><i>Assigned to: " + DirArray[umgVideos[i].extCoachId][0] + "<\/i><\/p>";
}
if (ListHTML == ""){ListHTML="No videos found.";}
document.getElementById("VideoList").innerHTML = ListHTML;
}
</script>
<div id="VideoList">Looking for uploaded videos, please wait...</div>
-
Nov 7th, 2012, 01:55 PM
#2
Re: Can anyone help make my scripts IE friendly? (JavaScript)
You could debug the scripts, in IE using F12. Then you can see where the problem is and you can google that or ask here again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|