javascript-switching between swfs..

Discussion in 'Web Design and Development' started by pelsar, Apr 30, 2009.

  1. pelsar macrumors regular

    Joined:
    Apr 29, 2008
    Location:
    israel
    #1
    i actually found some javascript code, modifed it and got it working....only to discover that on the pc under explorer it doesnt work properly:

    http://www.spinnerdesign.co.il/flash_examples.html (the list on the left)

    on the mac in safari and firefox the flash movies stay within the proper div...on the pc, under IE, the window is replaced with the swf playing full screen...no good.

    anybody know how to modify the javascript code to make it work properly under IE?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I'll make some guesses.

    On this line from the JavaScript inside the HTML file,
    PHP:
    var attributes = { dataurlwidth:"450"height:"350",   };
    There's an extra comma at the end there. It may be giving IE some trouble.

    This line also in the HTML,
    PHP:
    div.setAttribute("id"targetID);
    IE has been known to have trouble using the set/getAttribute functions. Generally it's more compatible to use,
    PHP:
    div.id targetID;
    Is IE giving any error messages that may help?
     
  3. pelsar thread starter macrumors regular

    Joined:
    Apr 29, 2008
    Location:
    israel
    #3
    wow......it was the comma....

    I'm always amazed at how such a little thing can screw things up so well.....and there was no way i was going to find that

    thanks a bunch
     

Share This Page