Check to see if Javascript is enabled?

Discussion in 'JavaScript' started by mikelbeck, Aug 22, 2006.

  1. #1
    How can I check to see if Javscript is enabled in the client's browser?

    I have a page that uses Javascript to hide affiliate links, but I've gotten a couple of e-mails saying that people can't see anything at all. Those people all have Javascript disabled. So I'd like to check to see if it's disabled, and if so, use a different method for obscuring the links.
     
    mikelbeck, Aug 22, 2006 IP
  2. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You can use the <noscript> tag.
     
    phper, Aug 22, 2006 IP
  3. mikelbeck

    mikelbeck Well-Known Member

    Messages:
    790
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Ah, ok. I'll have a look into that.
     
    mikelbeck, Aug 23, 2006 IP
  4. mikelbeck

    mikelbeck Well-Known Member

    Messages:
    790
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    108
    #4
    I use Javascript in the "onmouseover" and "onmouseout" in the "a" tag when I build the page. How could I use <noscript> in this case?

    For example, a link looks like this:

    <a onmouseover="window.status='eBay Auction #330018670026 - 3PC SLIPCOVER SET SOFA LOVESEAT CH SLIP COVER Plam Tree'; return true;" onmouseout="window.status=' ';return true;" href="http://www.qksrv.net/click-2018380-10381315?loc=http://cgi.ebay.com/ws/eBayISAPI.dll%3FViewItem%26item%3D330018670026%26ih%3D014%26category%3D20577%26ssPageName%3DWDVW%26rd%3D1&amp;sid=lw" onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;" title="eBay Auction #330018670026 - 3PC SLIPCOVER SET SOFA LOVESEAT CH SLIP COVER Plam Tree"><img alt="3PC SLIPCOVER SET SOFA LOVESEAT CH SLIP COVER Plam Tree" title="3PC SLIPCOVER SET SOFA LOVESEAT CH SLIP COVER Plam Tree" src="http://thumbs.ebay.com/pict/330018670026.jpg" width="75"></img></a>
    HTML:
    So when a user mouses over the link, it's shown as "eBay Auction #330018670026 - 3PC SLIPCOVER SET SOFA LOVESEAT CH SLIP COVER Plam Tree" instead of the affiliate URL. I was hoping for a way to check the browser at the start of the page load, and if Javascript is disabled I could build the links differently. Is there a way to do that?
     
    mikelbeck, Aug 23, 2006 IP
  5. mikelbeck

    mikelbeck Well-Known Member

    Messages:
    790
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Does anybody have any suggestions about how to do this?
     
    mikelbeck, Aug 26, 2006 IP