Foren
aui:form and onsubmit issue
William Gosse, geändert vor 11 Jahren.
aui:form and onsubmit issue
Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
When I add an onsubmit to my aui:form tag it doesn't seem to prevent the submission even the javscript that's called is returning false.
I even tried just having onSubmit="return fales;" in the aui:form tag which didn't stop the submission as well.
I'm trying to add this to the standard login.jsp.
Is there something special about how aui:form handles onsubmits?
I even tried just having onSubmit="return fales;" in the aui:form tag which didn't stop the submission as well.
I'm trying to add this to the standard login.jsp.
Is there something special about how aui:form handles onsubmits?
William Gosse, geändert vor 11 Jahren.
SOLVED: aui:form and onsubmit issue
Liferay Master Beiträge: 533 Beitrittsdatum: 04.07.10 Neueste Beiträge
I got this to work by moving my javascript call to the onclick on the submit button.
daddy 32, geändert vor 9 Jahren.
RE: SOLVED: aui:form and onsubmit issue
New Member Beitrag: 1 Beitrittsdatum: 09.12.13 Neueste BeiträgeWilliam Gosse:
I got this to work by moving my javascript call to the onclick on the submit button.
But that's not a solution - what happens when user submits the form by pressing enter?
Brijesh Desai, geändert vor 8 Jahren.
RE: SOLVED: aui:form and onsubmit issue
Junior Member Beiträge: 55 Beitrittsdatum: 22.10.14 Neueste Beiträge
We were struggling with same to return false from js method which is called from onSubmit of form.
AUI form , onSubmit= "return false;" doesn't work.
Work around is put following on your aui form.
<aui:form id="setup-property-fm" onSubmit="event.preventDefault(); addproperty();" </aui:form>
event.preventDefault() is working and validated.
Thanks,
Brijesh D
AUI form , onSubmit= "return false;" doesn't work.
Work around is put following on your aui form.
<aui:form id="setup-property-fm" onSubmit="event.preventDefault(); addproperty();" </aui:form>
event.preventDefault() is working and validated.
Thanks,
Brijesh D
Abdur rasheed, geändert vor 8 Jahren.
RE: aui:form and onsubmit issue
Junior Member Beiträge: 71 Beitrittsdatum: 26.09.08 Neueste Beiträge
Hi ,
Check your script whether it is loading or not.
Check your script whether it is loading or not.
Brijesh Desai, geändert vor 8 Jahren.
RE: aui:form and onsubmit issue
Junior Member Beiträge: 55 Beitrittsdatum: 22.10.14 Neueste BeiträgeAbdur rasheed:
Hi ,
Check your script whether it is loading or not.
Yes, it is loading and working as expected and validated.