Current location: Hot Scripts Forums » General Web Coding » JavaScript » Effective and secure form submission methods?


Effective and secure form submission methods?

Reply
  #1 (permalink)  
Old 03-03-09, 02:44 AM
bassa bassa is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Effective and secure form submission methods?

Hello!

I have been struggling to implement a ASP-based CAPTCHA method unto my web form, but haven't gotten it working yet.

So I'm looking for perhaps an alternative way of doing this.

Here's my contact form. It's the completely regular one, where user enters his/hers username, adress, phone number, etc.:

http://www.froso.dk/test/kontakt/skriv.asp

I know absolutely nothing about ASP coding, which is likely why I haven't gotten it to work.

Perhaps there are, at least, decent alternatives using JavaScript and/or CSS instead?

If anyone could point me in the direction of how to create a secure web form using JavaScript/HTML/CSS, I'd greatly appreciate it!

Thank you!


Cheers,
Bassa
Reply With Quote
  #2 (permalink)  
Old 03-03-09, 03:22 PM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
Since JavaScript happens on the clientside, can be turned off, is not interpreted by robots/spiders and so on, there's really not much you can do on the client alone.

What kind of security do you need? Any prevention of malicious code being injected should of course all happen on the server, but I'm guessing you want to stop spambots?

Here's a couple of tips on how to prevent bots without using measueres visible to the visitor: Ned Batchelder: Stopping spambots with hashes and honeypots
They do require some serverside code, but there's not really a good way around that.

If nothing but clientside code is out of the question, I'd leave the action-part of the form tag empty (or rather fill it with an invalid url), then use JavaScript to fill it in when the page has loaded. That way no bot will ever be able to submit that actual form, as they don't parse JavaScript.

But of course it won't for humans who've turned of JavaScript either, and any spammer who takes the time to dig out the URL from the script can easily submit POST data directly to it.
__________________
[W3Schools - learn all about the standards.] [QuirksMode - Browser Quirks] [MS's Online Reference Docs] [DOM in Gecko.]
Please pay attention to stickys, announcements and forum rules, thank you.
Please also remember Code Wrappers and [SOLVED] Marking, this helps everyone.
Reply With Quote
  #3 (permalink)  
Old 03-04-09, 01:51 AM
bassa bassa is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, perhaps I was being a tad too vague on my request.

What I need is a simple form available on my webpage with decent anti-spam security (CAPTCHA, I guess) and with form validation.

Thanks for the link, it has some nice information.


Cheers,
Bassa
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 11:46 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.