SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Also available in Large Si's Avatar
    Join Date
    Sep 2002
    Location
    Walsall, UK
    Posts
    1,911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Print different variable depending on URL

    I'm trying to get this script working but it doesn't seem to want to:

    Code:
    <script language="javascript">
    <!-- 
     var thisURL = window.location;
     if (thisURL.indexOf('simonjobling') != -1) {
      document.writeln('<im' + 'g src="../images/layout/logo.gif" border="0" width="105" height="111" />');
     } else { 
      document.writeln('external');
     } 
    //-->
    </script>
    Any ideas?
    Si
    Are you a Photoshop Jedi Master? Prove it!

    Is funky house your bag? You'll love this!

    Voice
    , eyes, ears, body and hands.


  2. #2
    SitePoint Wizard silver trophy rushiku's Avatar
    Join Date
    Dec 2003
    Location
    A van down by the river
    Posts
    2,056
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    window.location is not a string, it's the location object, try
    window.location.href

  3. #3
    Also available in Large Si's Avatar
    Join Date
    Sep 2002
    Location
    Walsall, UK
    Posts
    1,911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats the puppy - cheers fella!
    Si
    Are you a Photoshop Jedi Master? Prove it!

    Is funky house your bag? You'll love this!

    Voice
    , eyes, ears, body and hands.



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
  •