![]() |
How do i stop the loading of a page with JS?
Hello!
I've built a form, and in the form there are some inputs. So, i've built a little function in JavaScript to validate the value of the fields (in this case a radio button): Code:
HTML Code:
<input type="submit" value="Checkout" onclick="checkShipment()"> I want to know, how can i stop the browser from proccessing to the next page in case of errors. Thanks! |
please someone?
|
Use the "onsubmit" property on the form tag and call your function with "return" (ie. onsubmit="return yourcheck(datainput)"). Return false (in your function) to stop submission, true to continue.
|
All times are GMT. The time now is 01:10 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|