Jump to content

Validate form on response page


mpower

Recommended Posts

Normaly I validate forms with PHP or other middle ware languages. But in this case I need to do it with JavaScript. Problem is that I'm not very good at it.

 

Maybe someone is able to help me a bit? I need to "validate" a form on the response page. Let me describe an easy example for what I'm trying to accomplish.

 

I got two checkboxes in the form - one named "A" and the other "B".

 

On the response page it should check wich one of the checkboxes that was checked and if it was "A" it shell output 1, if it was "B" it shell output 2 or if both where checked it shell output "Error".

 

Does anyone know how  to accomplish this?

 

Thanks in advance // Jonas

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.