Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: JS redirect for Firefox causes site not to load in IE!

  1. #1
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JS redirect for Firefox causes site not to load in IE!

    I have a site that is entirely Flash, but I also have an html version since Firefox has issues with .swf and .flv files. I used the following code for when the user is viewing in firefox to direct them to the html version, but this code also prevents the flash site from opening in, shocker, IE. Is there a hack or something to work around this to get it to work in IE - PLEASE!

    if(navigator.userAgent.indexOf("Firefox") != -1)
    {
    window.location = "http://www.meridianbiogroup.com/index2.htm";
    }
    else if(navigator.userAgent.indexOf("MSIE") != -1)
    {
    window.location = "http://www.meridianbiogroup.com";
    }

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Why arent swf or flvs working in firefox? There is not a known problem with swfs/flvs and ff; with a majority of users using ff you should solve that problem rather than hack around something else.

    Also note that swfs arent the same as flv, flvs are flash video files and swf are, in short, shockwave files so I'd solve the problem first is the problem with your swfs or flvs then why is it so...

    If you post a link or code we could probably help you further.
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    bluewalrus is right, this works fine in IE and Firefox, probably many others:

    Code:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="960" height="600">
    	<param name="movie" value="Meridian.swf" /> 
    	<param name="quality" value="high" />
    	<param name="wmode" value="opaque" />
    	<param name="swfversion" value="9.0.45.0" />
    	<param name="expressinstall" value="../Scripts/expressInstall.swf" />
    	<!--[if !IE]> <-->
    		<object data="Meridian.swf" width="960" height="600" type="application/x-shockwave-flash">
    		<param name="quality" value="high" />
    		<param name="wmode" value="opaque" />
    		<param name="menu" value="false" />
    		<param name="swfversion" value="9.0.45.0" />
    		<param name="expressinstall" value="../Scripts/expressInstall.swf" />
    		<div>
    			<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    		</div>
    		</object>
    	<!--> <![endif]-->
    	<!--[if IE]>
    	<div>
    	<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    	<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    	</div>
    	<![endif]-->
    </object>
    The problem with your rediredt code though is that it shouldn't redirect at all for IE, because it's already on the proper page. The way you have it in your post there, it would at best go into an endless loop in IE.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well I have had issues with FFox and have read up on them as well. I do know the dif between a .swf and .flv file and am just as baffled as to why it's not working when I've actually had other .swfs play in FF w/out issue.

    The site is: www.meridianbiogroup.com. When I attempt to open it in FF here is the error I get:

    "Content on this page requires a newer version of Adobe Flash Player."

    I do have the latest player installed. I've double and triple checked that and I still get this issue. My client is also receiving this error.

    I really appreciate everyone's replies - every bit helps! =)

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Replace:

    Code:
              <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="960" height="600">
                <param name="movie" value="Meridian.swf" />
                <param name="quality" value="high" />
                <param name="wmode" value="opaque" />
                <param name="swfversion" value="9.0.45.0" />
                <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                <param name="expressinstall" value="../Scripts/expressInstall.swf" />
                <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="Meridian_CS3.swf" width="960" height="600">
                  <!--<![endif]-->
                  <param name="quality" value="high" />
                  <param name="wmode" value="opaque" />
                  <param name="swfversion" value="9.0.45.0" />
                  <param name="expressinstall" value="../Scripts/expressInstall.swf" />
                  <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                  <div>
                    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                  </div>
                  <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
              </object>
    with:

    Code:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="960" height="600">
    	<param name="movie" value="Meridian.swf" /> 
    	<param name="quality" value="high" />
    	<param name="wmode" value="opaque" />
    	<param name="swfversion" value="9.0.45.0" />
    	<param name="expressinstall" value="../Scripts/expressInstall.swf" />
    	<!--[if !IE]> <-->
    		<object data="Meridian.swf" width="960" height="600" type="application/x-shockwave-flash">
    		<param name="quality" value="high" />
    		<param name="wmode" value="opaque" />
    		<param name="swfversion" value="9.0.45.0" />
    		<param name="expressinstall" value="../Scripts/expressInstall.swf" />
    		<div>
    			<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    		</div>
    		</object>
    	<!--> <![endif]-->
    	<!--[if IE]>
    	<div>
    	<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    	<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    	</div>
    	<![endif]-->
    </object>
    Last edited by jscheuer1; 11-12-2010 at 06:08 PM. Reason: remove extraneous param - doesn't affect outcome
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John, thanks a ton - I'll give it a go!

  7. #7
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, so unfortunately nothing worked. I did create another Flash file that skipped the opening movie which DOES open in Firefox. So with that I only added the follow redirect code for Firefox..


    if(navigator.userAgent.indexOf("Firefox") != -1)
    {
    window.location = "http://www.meridianbiogroup.com/home.html";
    }

    </SCRIPT>


    The problem now is that it won't open in Firefox on the PC side and it's also now not opening in Chrome...

    Suggestions?

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John, what OS are you on and in what browsers are you seeing it in?

    Thanks for the reply!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Windows 7. IE 8 (in IE 8 and IE 7 modes), IE Tester in IE 6 mode, Firefox 3.6.12, Opera 10.63, Chrome 7.0.517.44, Safari 5 Win.

    All using Adobe Flash Player 10,1,102,64.

    Why? What OS, browser, and Flash version is giving you trouble on my demo page?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •