Debt Consolidation - Debt Consolidation - Debt Consolidation - Deaf Topics - Anime Downloads

PDA

View Full Version : Check to see if Javascript is enabled?


mikelbeck
Aug 22nd 2006, 6:25 pm
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.

phper
Aug 22nd 2006, 8:03 pm
You can use the <noscript> tag.

mikelbeck
Aug 23rd 2006, 3:39 am
Ah, ok. I'll have a look into that.

mikelbeck
Aug 23rd 2006, 6:41 am
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>

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 26th 2006, 10:57 am
Does anybody have any suggestions about how to do this?