User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 426,932 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,456 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1799 | Replies: 5 | Solved
Reply
Join Date: Mar 2007
Location: Ireland
Posts: 17
Reputation: cormee is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
cormee's Avatar
cormee cormee is offline Offline
Newbie Poster

How would I display somethign only if javascript is enabled?

  #1  
May 24th, 2007
Hi

I'm getting a few spammers bypassing certain form elements on my site which I attribute to them having javascript disabled. Is there any way of diplaying the <form></form> content if it's enabled and otherwise displaying a message saying "We are no longer taking registrations".

I'm not too concerned about losing the 10% of regular web surfers who have javascript disabled .

Last but not least is there any way of checking to see if javascript is enabled before a form action is processed?

Thanks a lot
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: How would I display somethign only if javascript is enabled?

  #2  
May 24th, 2007
Easy, have JavaScript write that part of the page. If JavaScript is turned off, they'll never see it. That's a core principle of progressive enhancement.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 115
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: How would I display somethign only if javascript is enabled?

  #3  
May 25th, 2007
I was going to suggest that too.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Dec 2005
Posts: 2,703
Reputation: The Dude is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 23
The Dude's Avatar
The Dude The Dude is offline Offline
Posting Maven

Re: How would I display somethign only if javascript is enabled?

  #4  
Jun 1st, 2007
That might make his site extremly slow wouldnt it??


Trying to force ppl to use scripts isnt a good idea cause it causes problems,there are other anti spam measures you can enable though that would weed out spam bots........
Last edited by The Dude : Jun 1st, 2007 at 5:39 pm.
Reply With Quote  
Join Date: Mar 2007
Location: Ireland
Posts: 17
Reputation: cormee is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
cormee's Avatar
cormee cormee is offline Offline
Newbie Poster

Re: How would I display somethign only if javascript is enabled?

  #5  
Jun 1st, 2007
Originally Posted by The Dude View Post
Trying to force ppl to use scripts isnt a good idea cause it causes problems,there are other anti spam measures you can enable though that would weed out spam bots........


I ended up doing something completely different and it seems to work so the problem is solved hopefully - thanks for everyones suggestions
Reply With Quote  
Join Date: Dec 2005
Posts: 2,703
Reputation: The Dude is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 23
The Dude's Avatar
The Dude The Dude is offline Offline
Posting Maven

Re: How would I display somethign only if javascript is enabled?

  #6  
Jun 2nd, 2007
Very good
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 12:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC