Forum Moderators: open

Message Too Old, No Replies

Detect & Redirect IE + MAC

         

JAB Creations

1:53 pm on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Working on a school project & of course they have IE but not a Gecko browser on these things. I need to get IE (but only on a MAC) detected and redirected. Here is the script I came up with but it does not work.

if ((navigator.userAgent.indexOf("MSIE")!=-1) ¦¦ (navigator.userAgent.indexOf("Mac")!=-1)) top.location.href = [10.23.33.3...]

orion_rus

3:47 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



May be u can try to detect which browser is with specific function? I think Mac detects write.

rocknbil

5:22 pm on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Remove .href.

. . . top.location='myurl';

But I have to ask - are you intending to go to this URL if it's ANY MSIE or JUST MSIE for Mac?

If the first is correct, you are good, the ¦¦ is "or" so it's going to redirect for either. If you want to redirect only MSIE Mac, you need to change ¦¦ to &&

if ((navigator.userAgent.indexOf("MSIE")!=-1) && (navigator.userAgent.indexOf("Mac")!=-1)) { top.location= 'http://10.23.33.3/jab/index-ie.html'; }

JAB Creations

7:39 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to detect ANY MSIE on ONLY MAC.

orion_rus

5:37 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



but rocnkbill answer ur question i think ...?