Results 1 to 3 of 3

Thread: Determine if there were bind errors using javascript

  1. #1

    Default 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. #2

    Default

    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>

  3. #3

    Default

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

Similar Threads

  1. Replies: 1
    Last Post: Jul 28th, 2005, 04:51 AM
  2. Replies: 2
    Last Post: Apr 29th, 2005, 03:43 AM
  3. Replies: 2
    Last Post: Apr 28th, 2005, 02:01 PM
  4. Replies: 0
    Last Post: Jan 6th, 2005, 08:19 AM
  5. Bind errors
    By pak in forum Web
    Replies: 5
    Last Post: Sep 29th, 2004, 04:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •