Script doesn't execute on internet explorer .... But execute on firefox....????? Where have i gone wrong??
Hi everybody!!
i wrote a small script that loads a php generated list of thumbnails and videos from youtube, it works fine on Firefox but NOT on IE
I placed it in an external file and loaded it this way:
- <html>
- <head>
- .... lot of typing
- </head>
- <body>
- ... even more typing
- <!-- Passing value to youtubeRequest.js -->
- <script type="text/javascript">
- var sing = "<?php echo $_GET["singer"];?>"
- </script>
- <script type="text/javascript" src="js/youtubeRequest.js"></script>
- ... more scripts
- </body>
- </html>
this is my script
- $("document").ready(function(){
-
- $("#cdTable > tbody > tr").each(function(){
- var divID = "#" + $("td > div", this).attr("id");
- var tit = $("h4#title", this).text();
-
- var url = "getYTVideos.php";
- var loadingID = "loading" + $("td > div", this).attr("id");
- var loading = $("<img></img>")
- .addClass("loading")
- .attr("id", loadingID)
- .attr("src", "images/loading.gif")
- .attr("alt", "Loading...");
- $(divID).append(loading);
-
-
- $.get(url, { singer: sing, title: tit },
- function(data){
-
- $(data).find("video").each(function(){
-
-
- var img = $("<img></img>")
- .addClass("ytThumb")
- .attr("id", $(this).find("uImgid").text())
- .attr("src" , $(this).find("thumbnail").text());
-
- var playID = "play" + $(this).find("uImgid").text();
- var play = $("<img></img>")
- .addClass("play")
- .attr("id", playID)
- .attr("src", "images/Play-32.png");
- var vid = $("<object></object>")
- .addClass("ytVideo")
- .attr("id", $(this).find("vuid").text());
- $("<param />")
- .attr("name", "movie")
- .attr("value", $(this).find("vsrc").text())
- .appendTo(vid);
- $("<param />")
- .attr("name", "wmode")
- .attr("value", "transparent")
- .appendTo(vid);
- $("<embed />")
- .addClass("ytVideo")
- .attr("src", $(this).find("vsrc").text())
- .attr("type", "application/x-shockwave-flash")
- .attr("wmode", "transparent")
- .appendTo(vid);
-
- loadingID = "#" + loadingID;
- $(loadingID).hide().remove();
-
- $(divID).append(img).append(play);
-
- ID = divID + " > img.ytThumb";
-
- $(ID).live("click", function(){
-
- $(play).hide().remove();
- $(this).hide().remove();
-
- $(divID).append(vid);
- });
- });
- });
- });
- });
I'm not a professional web developper , so maybe i have done something really stupid, by the way i didn't tested the script on ie myself because .... i have only linux OS's on my machines , so i asked a friend of mine to roam on my site to test it, i haven't a domain yet if someone wants to check it out i can mail him the ip
Thank you for your time!!