Yes, you can submit form on Windows modal dialog.
Summary
Set the name of the modal dialog to let say ‘myModal’
The form inside the window modal dialog should have the target set to _self or name ‘MyModal’ and submit the form.
Details with Code
We will have three jsps,
1) The window modal opener (modalTest.jsp)
2) Window Modal Form Page (modelD.jsp)
3) Modal Form Submit page (modelSubmit.jsp)
modalTest.jsp
<html> return window.showModalDialog(url, "myModal", features); } function showWindow() </script> |
modelD.jsp
<html> window.name = 'myModal'; <input type ="text" name="test1"> </form> |
modelSubmit.jsp
<html> |
Save all these jsp to you JSP Containers (Tomcat, JBOSS or any)
call modalTest.jsp
The first screen you gonna see is aa simple click screen that you will click to open the windows modal dialog
On windows modal dialog you will see a form with a text field,
write your name in the text field in lower caps and submit the form… and yes the form submits and return the result with your name in Capital letters
That it, you can submit Windows Modal dialog.
3 comments:
It works Thanks buddy....
Thanks a lot... you saved my day....
Thanks a lot. It worked for me. I used
base target="_self"
Post a Comment