Fórumok

JavaScript validation in Liferay JSP page is not working

thumbnail
Karthik V S, módosítva 10 év-val korábban

JavaScript validation in Liferay JSP page is not working

Regular Member Bejegyzések: 106 Csatlakozás dátuma: 2011.12.21. Legújabb bejegyzések
Hi all,

I am using JavaScript validation for a portlet in jsp page. But in the application it is not working . i.e validation is not happening after eriting the code.

Follwoing is the code in JSP Page:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<script type="text/javascript">
YUI().use(
'aui-form-validator',
function(Y) {
new Y.FormValidator(
{
boundingBox: '#myForm'
}
);
}
);
</script>

<aui:form action="<%= URL.toString() %>" method="post" validate="true" id="myForm">
<aui:fieldset>
<aui:layout>
<aui:column>
<aui:input type="text" name="name" id="nameid" label="Vendor Name: " inlineLabel="true" cssClass="alignment" inputCssClass=""></aui:input>
<aui:input type="text" name="addressLine1" label="Address 1: " inlineLabel="true" cssClass="alignment"></aui:input>
<aui:input type="text" name="addressLine2" label="Address 2: " inlineLabel="true" cssClass="alignment"></aui:input>


<aui:button-row>
<aui:button type="submit" value="Submit"></aui:button>
</aui:button-row>
</aui:column>
</aui:layout>
</aui:fieldset>
</aui:form>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Can anyone help in this regard. Is there any error from the above code?

With Regards,

V S Karthik