View Full Version : javascript refresh (without loading whole page) problem

01-10-2008, 09:24 AM
well, the problem i have is the following.

I want to have a div that holds the swf file that contains the first video.
below that div are 3 thumbnails of the 3 videos i want to be able to play.
Whenever you click on one of them, the div holding the swf should refresh and show the one you chose.

The funny thing is i made it. It works when online (on a web server) very well on ie6 & ie7 but not in firefox. Firefox will just show the firt file you ask. Every other attempt to change the divs content will just not do anything at all.
the code i am using is the following :

<script type="text/javascript">
var str1 = "flash1.swf";
var str2 = "flash2.swf";
var str3 = "flash3.swf";
var setInnerHTML = function( id, str ){
if(!document.getElementById) return;
var so = new SWFObject(str, "flashVideo", "580", "326", "8", "#ffffff");
so.write(id); }
// -->

and of course, i am calling the function in the thumbnails as :


passing the div id and the string i want to use.
This works great on ie6 & ie7, latest safari, but not on firefox.
On opera, although the javascript refresh works fine, it has a problem with my css.
So all in all, the problem lies within firefox only as it seems!
any help?