Jump to content
php.lv forumi

IE 8 Redirect


zzcoolzz

Recommended Posts

Sveiki !

Man tads jautajums vai kads nevaretu pateikt ka to izdarit

ir bijis tads scripts kas redirecte uz citu lapu kad atrod IE6-7 explorer (browser)

 

    
           <!--Start
               var browser             = navigator.appName
               var ver                 = navigator.appVersion
               var thestart    = parseFloat(ver.indexOf("MSIE"))+1 
               var brow_ver    = parseFloat(ver.substring(thestart+4,thestart+7)) 

               if ((browser=="Microsoft Internet Explorer") && (brow_ver < 7)) 
                       {
                       window.location="http://manalapa/error.html"; 
                       }
               //End-->

 

man vajag ta lai kad ar 8IE butu tas pats kas ar 7 un 6 IE (notiek redirect bet ar 8 NE )

BET man nestrada uz 8Ie esmu meiginajis visu mainit scripta un neko!

taksto ka es esmu 4ainiks - ja varat palidzat :)

Link to comment
Share on other sites

4ainiks. :D

 

<!--[if lte IE 7]>
<script type='text/javascript'>
<!--
window.location = 'http://dagrevis.net/';
//-->
</script>
<![endif]-->

 

Mēģini, tikko uzskricelēju! :D

Edited by daGrevis
Link to comment
Share on other sites

...tur bija bags. Salaboju! Tikko pats notestēju -> iet! :)

 

<!--[if lte IE 7]-->
<script type='text/javascript'>
<!--
window.location = 'http://dagrevis.net/';
//-->
</script>
<![endif]-->

 

Heh, ta' vienkārši pamaini ko vajag... http://www.positioniseverything.net/articles/multiIE.html

 

P.S. Jāliek starp 'head' tagiem! JS jābūt ieslēgtam! :P

Edited by daGrevis
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...