View Single Post
  #3 (permalink)  
Old 10-09-08, 12:38 PM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
This part is an assignment, not a comparison, replace = with ==:
JavaScript Code:
  1. if(document.getElementById('hGo').value="T")
This would cause the form to always submit. Is that what you mean by "having problems?".

I would also suggest that you switch from using the GET method to POST when sending the text for validation as it'll probably get around a few problems with url encoding.

And I hope you also perform this check on the serverside, just in case JavaScript isn't enabled on the client, or someone tries to evade 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