Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Karthik V S
JavaScript validation in Liferay JSP page is not working
November 15, 2013 4:24 AM

Karthik V S

Rank: Regular Member

Posts: 106

Join Date: December 21, 2011

Recent Posts

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">
function(Y) {
new Y.FormValidator(
boundingBox: '#myForm'

<aui:form action="<%= URL.toString() %>" method="post" validate="true" id="myForm">
<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 type="submit" value="Submit"></aui:button>
Can anyone help in this regard. Is there any error from the above code?

With Regards,

V S Karthik

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!