PDA

View Full Version : Update and Loadscripts in IE & FF



zurik44
20 Jul 2007, 9:47 AM
Over the past few days I have been trying to figure out a bug that I have been having. I really don't even know if it's an ExtJs bug or if it has something to do with the browsers. I know there are issues existing with the LoadScripts not working with the prototype lib as I have read on the forum. However, I am using the YUI lib and I have LoadScripts working in both browsers (IE & FF). Except on this one perticular instance. Now I know what your thinking, instantly you would assume that it's my code if it works in other areas of my site and not on this occasion. However, I don't feel that this is true in this case.

Below are a list of computer resources that I've used to test. This is important because the above mentioned script seems to work fine on one computer in both IE & FF but on some computers it does not Load the Scripts on the page. Keep in mind this is on one perticular page and not on the entire site. LoadScripts seem to work fine all over my site. So I am very hesitant to blame ExtJs scripting for this perticular issue.

Test Subject 1: Local Home PC (development Machine) Runs IE 6.0.29 with SP2 & FF 2.0.0.4
Test Subject 2: Remote Server (development Server) Runs IE 7 & FF 2.0.0.5

Both of the above load the scripts perfectly!

Test Subject 3: Local Work PC (Test Machine) Runs IE 6.0.29 with SP2 & FF 2.0.0.5
Test Subject 4: Local Developer PC ( Co-Developer Machine ) Runs IE 6.0.29 with SP2 & FF 2.0.0.4
Test Subject 5: Local Work PC 2(Test Machine) Runs IE 7 & FF 2.0.0.5

Test Subects 3,4 & 5 all do not load the script and return 0 javascript errors in both browsers.


Below is the code that is running calling the page. Not too complicated. It's pretty much a text book example I think.



function getVideos(albumid,page){
$('videoPlacement').style.display='none';
var elVideos = Ext.get('videoPlacement');
var elVideosMgr = elVideos.getUpdateManager();
elVideosMgr.loadScripts=true;
elVideosMgr.update('/modules/mykiwidaddy/act.actions.cfm?action=getVideos&albumid=' + albumid + "&page=" + page);
$('videoPlacement').style.display='block';
}


This is the code I am trying to run from within the page in load scripts. In short, it loads a flash movie from the database into a Div



<script language="javascript">
var movieobj#rcount# = {"movies":[
{"vidpath":"#qryVideos.path##session.uuid#/videos/#qryVideos.small#","imgpath":"default","autoplay":0}
]
}
//alert("i'm running");
sendMovie(0,120,90,'myVideo#rcount#',movieobj#rcount#);
</script>



This is my function that I have created it use to just be function sendMovie(parm,ww,hh,divid,zMovie){} but i was testing different things and that is why it is set as a var now. Regardless I had the same results both ways.


var sendMovie = function(parm,ww,hh,divid,zMovie){
//alert('true');
if (zMovie){
//alert(true);
var mobj = zMovie.movies[parm];
var videoPlayer = new SWFObject("/themes/default/player/movieplayer.swf", "movie", ww, hh + 15, "8", "#CCCCCC");
videoPlayer.addParam("menu", "false");
videoPlayer.addParam("src", "/themes/default/player/movieplayer.swf");
videoPlayer.addParam("FlashVars","mwidth=" + ww + "&mheight=" + hh + "&vidpath=" + mobj.vidpath + "&imgpath=" + mobj.imgpath + "&autoplay=" + mobj.autoplay +"&clip=" + parm)
videoPlayer.addParam("wmode", "transparent");
videoPlayer.write(divid);
}
}




I am allowing anyone that can offer advice to to view the site.
http://beta.kiwidaddy.net/ (username:guest & password:guest)

All I ask is do not upload any files & do not upload any photos to the site. Also, Please do not change any of the settings for the Journal. We have it how we like it for presentation purposes. If you would like an account to play with send me an email to marco@kiwidaddy.com and sign up as your own user. The site is not in production yet, but your free to play with it.

Now back to the issue. The page in question if you login to the above mentioned site with the username & password provided. Once Logged in click on "My Kiwidaddy", then click on "My Videos" tab. From there click on any folder that has videos. If it works you will see the image below.

Screen Shot from Test Subject 2
http://beta.kiwidaddy.net/themes/default/images/screenshots/ss_myvideo_working.bmp

If it does not work you would get the following result.
Screen Shot from Test Subject 3
http://beta.kiwidaddy.net/themes/default/images/screenshots/ss_myvideo.bmp

Please if anyone has any clue as to what is causing this or how to solve it. If I have to pay for support I will, but before I did that I thought I'd post here to see if anyone had an opinion that may lead me into a solution.

Thank you so much, not only to those that help others here but to ExtJs for developing a great product.

Marco G. Williams (a.k.a Zurik of Llane)