Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
William Gosse
aui:form and onsubmit issue
30 aprile 2012 13.22
Risposta

William Gosse

Punteggio: Expert

Messaggi: 279

Data di Iscrizione: 4 luglio 2010

Messaggi recenti

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?
William Gosse
SOLVED: aui:form and onsubmit issue
14 maggio 2012 3.40
Risposta

William Gosse

Punteggio: Expert

Messaggi: 279

Data di Iscrizione: 4 luglio 2010

Messaggi recenti

I got this to work by moving my javascript call to the onclick on the submit button.
daddy 32
RE: SOLVED: aui:form and onsubmit issue
29 gennaio 2015 1.03
Risposta

daddy 32

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 9 dicembre 2013

Messaggi recenti

William 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
RE: SOLVED: aui:form and onsubmit issue
22 febbraio 2016 2.48
Risposta

Brijesh Desai

Punteggio: Junior Member

Messaggi: 37

Data di Iscrizione: 22 ottobre 2014

Messaggi recenti

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
Abdur rasheed
RE: aui:form and onsubmit issue
23 febbraio 2016 2.13
Risposta

Abdur rasheed

Punteggio: Junior Member

Messaggi: 71

Data di Iscrizione: 25 settembre 2008

Messaggi recenti

Hi ,
Check your script whether it is loading or not.
Brijesh Desai
RE: aui:form and onsubmit issue
23 febbraio 2016 6.19
Risposta

Brijesh Desai

Punteggio: Junior Member

Messaggi: 37

Data di Iscrizione: 22 ottobre 2014

Messaggi recenti

Abdur rasheed:
Hi ,
Check your script whether it is loading or not.



Yes, it is loading and working as expected and validated.