1 Reply Latest reply on Jun 4, 2008 1:22 PM by sergeysmirnov

    Submitting form from modal window

      hi,

      I have a Modal Window overlaying the parent window, and I want to submit from the Modal window and return to it. If errors are detected I would see the form field containing the errors or I would get an "action successful" message. When I click the submit button in the Modal window rather than returning to the modal window control returns to the Parent window and the Modal window is gone.

      I am Using JSF /Seam running on a tomcat 5 server. The Modal window is a user registration window (complete with field level error messages) that sends an email confirmation when successful or displays the fields in error on the modal window when data validation fails.

      Any help is much appreciated.

      Thanks

        • 1. Re: Submitting form from modal window

          Have an Ajax button as a submit button for your modal dialog form. Let this button has a valid action outcome that follows to the next page (do not forget < redirect /> for that navigation rule).
          In this way, you form will stay and show the validation message if any. Otherwise, proceed to the next page normally.