164
rated 0 times
[
165]
[
1]
/ answers: 1 / hits: 12698
/ 10 Years ago, fri, july 11, 2014, 12:00:00
I would like to add some inline javascript that alerts the user with a message AND then returns false, preventing the form from submitting.
onsubmit=return alert('You must be logged in to register'); return false
With the code above, I get the alert but the form still submits. I would like to retain the inline JS if possible. I searched around but couldn't find an inline example that follows this pattern. I know how to achieve this by executing a function with onsubmit, but again, would like to retain inline if possible.
More From » inline