• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Web programming form question (JavaScript)

Status
Not open for further replies.

goodcow

Member
This isn't for me, since I can't understand how people can even look at code all day, but my friend is trying to make a form with Javascript authentication that'll pop up errors based on missing fields of information, which ALSO includes something that'll let him change the submit button to a non-clickable "Please wait..." while the form is being submitted to a database to avoid double submissions. He can get each to work individually, but not together, as the Javascript apparently makes them conflict.

Ideas? Links?
 
link

Just a note: if he is dealing with important data, he may want to use some sort of server side authentication. Javascript isn't the most reliable method due to the fact that it is run client side and can be interpretted differently in different browsers, or bypassed all together.
 

jumper

Member
DevGuru

Click the link above, the site has links to Javascript objects, functions, etc.

Anyways, I think some client side validation is fine(as you don't have to post to the server and come back if something is invalid), as long as important data is re-validated on the server-side (for safe measure).

But as far as exactly why it won't work 'together', i'd have to see the code. It's definitely do-able, as I've done that stuff before. And what do you mean by 'He can get each to work individually, but not together'? Do you mean if he leaves two fields blank it doesn't work right? I'd like to see how he's referencing these fields. Also, does he process the javascript validation on the onSubmit event?
 
Status
Not open for further replies.
Top Bottom