PDA

View Full Version : anyone have a javascript disabled workaround?



LuckyShima
02-10-2006, 03:01 AM
Latest stats are that 10% of users have javascript disabled. I want to use javascript for a pop-up sized window. If javascript is disabled nothing happens when the link is clicked (of course). Is there any workaround that can solve this? Is there a way to detect if javascript is disabled? I have done a lot of searching on this and it doesn't look likely, but I wondered what some of you are doing because I know some of you are using javascript.

Thanks

agua
02-10-2006, 03:57 AM
Not sure if this is what you want - a dhtml popup.

http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=2681

Masetek
02-10-2006, 05:58 AM
dhtml is basically javascript :)

That will not work on a JS disabled browser. I had a bit of a hunt around...I'll ask my mate about it - if there is a way he'd know. Im interested to knw the answer to this too.

I'll post the answer here...

agua
02-10-2006, 02:44 PM
Oh yeah - thats what you get for posting when flying out of the door for a friday beer :)

Masetek
02-10-2006, 05:28 PM
This is the response I got:



Just see if any dom properties respond i.e. document.all or window.title
etc.

To open a new window you can put a 'target' property in links i.e <a
href="mypage.html" target="_blank">. Otherwise you can't.


Doesn't look like you can automatically.

LuckyShima
02-10-2006, 06:03 PM
Thanks for that Masetek and Agua.

Apart from the specific problem, I am also interested in what others are doing about running javascript on their websites. Do you just ignore those who have it disabled? Or have some sort of message? Or don't use it?

LuckyShima
02-10-2006, 10:34 PM
Funny thing ... while I was fooling around with this I realised that the 'email riddler' I use to hide my emal addresses from bots - http://www.dynamicdrive.com/emailriddler/ - does not display the email address to browsers with javascript disabled (coz it's written in javascript :D)

Anyway ... it sure does fool the email harversters so I am not changing it until I can think of a better solution.

Masetek
02-11-2006, 12:57 AM
I use images for email addresses.

As far as users with JS disabled I don't do anything. I didn't know it was as high as 10% though. What's your source? I don't use JS for much anyways

LuckyShima
02-11-2006, 02:57 AM
quote >>"JavaScript Statistics

There are no absolute trends about the use of JavaScript. Some users have scripting turned off. Some browsers don't support scripting:

2006 JavaScript On JavaScript Off
January 90% 10%"

source:

http://www.w3schools.com/browsers/browsers_stats.asp

10% disabled seems a bit high to me, but who am I to argue with the 'stats' ;)

ogito
02-11-2006, 04:01 AM
I doubt it is really 10%...

Masetek
02-11-2006, 04:12 PM
That does seem too high. And if w3schools is using their own stats (which I think they do) their reports aren't really that accurate because most of the visitors to the w3 site woud be webmasters and developers. And I doubt they have js disabled

LuckyShima
02-12-2006, 06:54 PM
If anyone is interested, it seems that there is an example of what I need here on the ebay site:

https://scgi.ebay.com.au/ws/eBayISAPI.dll?RegisterEnterInfo

The line at the top where it says " Register now to bid, buy or sell on any eBay site"

If you click "sell" with cookies enabled it opens a pop up window, if cookies are disabled it opens a new window.

I had a quick look but can't quite work out how the are doing this, I will have more time later to look at it or get someone else do it. At least I can see it is possible.