View Full Version : Determine if there were bind errors using javascript
rlynn
Aug 31st, 2005, 01:30 PM
Hi. I have a form in a popup window which I would like to close if there were no validation errors on a save. I have a button which calls a javascript function that submits the form, then I want to check to see if validation errors occurred before closing the popup from the same javascript function. How can I do this? Thanks!
simtin
Aug 31st, 2005, 05:43 PM
Hi,
I'd think about something like this:
<spring:bind path="command.*">
<c:choose>
<c:when test="${empty status.errorMessages}">
<body onLoad="closeFunction();">
</c:when>
<c:otherwise>
<body>
</c:otherwise>
</c:choose>
</spring:bind>
rlynn
Sep 1st, 2005, 08:49 AM
Thanks!! I made a slight modification so the window didn't close the first time I opened it and it works!!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.