Javascript - Yes or No?

  SimpleSimon1 16:24 24 Jul 2007

This thought arises from a discussion about email address scramblers. I commented that the latest scramblers use Javascript rather than HTML and asked whether the resulting link would still work if my browser didn't support Javascript?

Someone else replied that it wouldn't and commented "I wouldn't have thought that it would be a great problem, as most people browse with Javascript enabled, simply because a large proportion of modern sites "break" without it"

Is this a safe assumption to make (especially since the site is designed to market my wife's hypnotherapy practice)? Can we really assume that people without Javascript can - essentially - be ignored (what about the FF NoScript extension - I'm told it is quite popular)

Also, what do the accessability gurus have to say about the use of Javascript?

All thoughts gratefully accepted

  adamcoppard 11:45 26 Jul 2007

Generally JavaScript is left on by a great percentage of the web community. When you take a look around at websites and look at how many use JavaScript, and don't degrade nicely, it means simply that most people will leave JavaScript turned on. However, saying that the security mad have JavaScript turned off.

If you are going to scramble e-mail addresses why not code a very simple PHP contact form (e-mail me via yelow envelope if you want a simple script) and then create a simple e-mail address like [email protected] to display on the pages if users don't want to go through a contact form.

If you do want to scramble it, however use DOM Scripting (read Jeremy Keiths book on the subject aswell) which is basicaly JavaScript that degrades nicely over older browsers etc.

  rachwelian 17:01 31 Jul 2007


don't use javascript to hide your email addresses. I'd suggest using PHP instead - it's a server-side language meaning all your visitors will be able to see the email address.

  adamcoppard 15:40 01 Aug 2007

Fair point, anyone can look into the JavaScript. How about encrypted JavaScript/ Encrypted E-mail? ;-)

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

See mcbess's iconic style animated for Mercedes-Benz

iPhone X news: Release date, price, new features & specs

Black Friday 2017 : date, sites participants & bonnes affaires