Welcome visitor
* Login
* Register
It is currently January 17th, 2019, 12:33 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Where and when should a form be validated?
PostPosted: January 12th, 2010, 3:49 am 

Posts: 17
Hello people,

today I need your help with the logic for what I want to do. I want to validate the fields of a form before the form is submitted, then, only if the validation was "true" redirect to a "Thank you" page, else send an alert message. What should be then the action file of the form?


Top
 Profile  
 
  Re: Where and when should a form be validated?
PostPosted: January 12th, 2010, 4:41 am 
User avatar

Posts: 71
The action should be the Thank you file. The trick will be on the validation, if it was true, then submit the form:
<script>
function sendform(){document.form.submit();
else
alert('error');
return false;}
</script>

<input type="button" value="send" onclick="sendform();">


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron