|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Simple JS question
If one adds a onClick="function();" to a submit button. Will the JS function be processed before it goes onto the php page that it will ultimately go to?
example: <form method="post" action="blank.php"> <input type="text"> <input type="submit" onClick="validate();" name="whatever"> Will the validationg take place before the form is sent to the next php page? I think it will, but i wanted to make sure |
|
#2
|
|||
|
|||
|
RE: Simple JS question
You can't do it that way to validate before submission. You should call the function in <form onSubmit='....'> tag..
Check this http://www.yourhtmlsource.com/javascript/formvalidation.html |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Simple JS question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|