Announcement Announcement Module
Collapse
No announcement yet.
Determine if there were bind errors using javascript Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Determine if there were bind errors using javascript

    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!

  • #2
    Hi,

    I'd think about something like this:

    Code:
    <spring&#58;bind path="command.*">
      <c&#58;choose>
      <c&#58;when test="$&#123;empty status.errorMessages&#125;">
         <body onLoad="closeFunction&#40;&#41;;">
      </c&#58;when>
      <c&#58;otherwise>
         <body>
      </c&#58;otherwise>
      </c&#58;choose>
    </spring&#58;bind>

    Comment


    • #3
      Thanks!! I made a slight modification so the window didn't close the first time I opened it and it works!!

      Comment

      Working...
      X