SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why won't this script load?

    Code:
    <script type="text/javascript">
    var ua = navigator.userAgent;
    if (
    (ua.match(/iPhone|iPod/i)
    || ua.match(/Blackberry/i)
    || ua.match(/Android/i)
    || ua.match(/Windows Phone/i))
    && !window.location.href.match(/fullsite=true/i)
    ) {
    location.replace(“http://www.vfmii.com/exc/aspquery?command=invoke&ipid=1095352&ids=110215”);
    } else if (ua.match(/iPad/i) && (!window.location.href.match(/fullsite=true/i))) {
    location.replace(“http://www.vfmii.com/exc/aspquery?command=invoke&ipid=1095352&ids=120785”);
    }
    </script>
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,717
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    The double quotes around the strings near the end of the code, aren't actually double quotes. Replace them with double quotes and then try again.

    This is a double quote - "
    This is a unicode character for the left double quote - “
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •