Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
William Gosse
aui:form and onsubmit issue
30 de Abril de 2012 13:22
Resposta

William Gosse

Ranking: Regular Member

Mensagens: 249

Data de entrada: 4 de Julho de 2010

Mensagens recentes

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 de Maio de 2012 03:40
Resposta

William Gosse

Ranking: Regular Member

Mensagens: 249

Data de entrada: 4 de Julho de 2010

Mensagens recentes

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 de Janeiro de 2015 01:03
Resposta

daddy 32

Ranking: New Member

Mensagens: 1

Data de entrada: 9 de Dezembro de 2013

Mensagens recentes

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 de Fevereiro de 2016 02:48
Resposta

Brijesh Desai

Ranking: Junior Member

Mensagens: 37

Data de entrada: 22 de Outubro de 2014

Mensagens recentes

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 de Fevereiro de 2016 02:13
Resposta

Abdur rasheed

Ranking: Junior Member

Mensagens: 71

Data de entrada: 25 de Setembro de 2008

Mensagens recentes

Hi ,
Check your script whether it is loading or not.
Brijesh Desai
RE: aui:form and onsubmit issue
23 de Fevereiro de 2016 06:19
Resposta

Brijesh Desai

Ranking: Junior Member

Mensagens: 37

Data de entrada: 22 de Outubro de 2014

Mensagens recentes

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



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