Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,381
    Thanks
    264
    Thanked 32 Times in 31 Posts

    getting value of msie

    hi i ran this on IE and on Firefox..

    both times the value is one... 'MSIE' cant possibly be in the FF agent


    Code:
    <script type="text/javascript"> 
    
    /* added for ie check */
          var uag = window.navigator.userAgent
          var msie = uag.indexOf ( "MSIE " )
    
          if ( msie > 0 )
           {
             <?php
              $iebrows = 1;
             ?>
    
           }
    </script>
    Last edited by durangod; 07-06-2013 at 07:48 AM.

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,235
    Thanks
    10
    Thanked 270 Times in 269 Posts
    You've combined JS which runs on the client, with PHP running on the server. Somehow I have a feeling your "check" for the value of $iebrows isn't going to work out. Pick one, client or server, where you need to know this information, and check the user agent there.

    Dave

  • Users who have thanked tracknut for this post:

    durangod (07-06-2013)

  • #3
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,381
    Thanks
    264
    Thanked 32 Times in 31 Posts
    Yeah i pretty much woke up and had a duh moment lol and was actually comming here to say prob solved as i yes quite correct you are. I do feel silly. thanks so much for the reply


  •  

    Posting Permissions

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