The showModalDialog was never intended to start another conversation with the server. It was intended to elicit a single respone and then immediately return to the main page. If you're planning on keeping the window open for multiple submits, I'd suggest using window.open() instead. If you submit a Struts action in a form opened with window.open(), the server will return the response to the same window with no problems. [ May 23, 2006: Message edited by: Merrill Higginson ]
But window.open() creates a new session. I want the same session in which i have already so many data with session.setAttribute().
I have tried with popup window in Struts.But it also creates a new session.
posted 14 years ago
I use window.open() all the time and it does not create a new session for me. I'm able to access the original session and modify it.
I'm wondering what the factors might be that are causing a new session to be created for you. Could you show us the basic code that you're using to open a window and populate it with a JSP? Maybe something will pop out at me.
Also tell us a bit about your environment, specifically which App Server, which browser, and which version of Struts you're using. [ May 24, 2006: Message edited by: Merrill Higginson ]
This iframe solution works fine to submit form in modal dialog window but I have another issue. If any can help, i'll appreciate.
I am submitting form from modal dialog window to export data in different file formats like excel, word, html etc.
It works fine for excel and word formats but not for html. When I select html format and submit form, correct response comes and browser opens one dialog box for user to ask "save", "open" and "cancel" export data. It works fine if user save the file as html but not able to open file as html.
I think this is because its a modal window not the normal browser window.
Can you please help me with this and if somebody knows some solution, please reply back.