J
John Pailing
I currently have a form which has several buttons. When the user
click on one of the buttons the Action for the Form uses some business
logic to decide which page the user should see next. All pretty
standard so far!
However we would like the new page that appears to appear as a dialog
box rather than a new page within the browser. In other words as if
the javascript "window.open" had been used to load the page. Is there
a simple way I can do this in Struts?
I have tried putting the following in the Action Mapping Forward Path
"javascript:window.open('/ourapp/newpage.jsp')", however I get an 500
internal error. And I'm not sure how it would know how to fill out
the URL if it did work i.e. How it would change "/ourapp/newpage.jsp"
to http://ourserver:7001/ourapp/newpage.jsp?
Other ideas is to have a central .jsp page which you would pass the
name of the dialog .jsp you want to open, and let it do the work for
you. But I can see this being very messy.
The only other idea I have is to try and overide the struts request
processer, but I'm new to struts and don't know if this is achievable.
As I'm new to Struts, I'm sure I am missing something!
Any help appreciated, Many Thanks
John Pailing
click on one of the buttons the Action for the Form uses some business
logic to decide which page the user should see next. All pretty
standard so far!
However we would like the new page that appears to appear as a dialog
box rather than a new page within the browser. In other words as if
the javascript "window.open" had been used to load the page. Is there
a simple way I can do this in Struts?
I have tried putting the following in the Action Mapping Forward Path
"javascript:window.open('/ourapp/newpage.jsp')", however I get an 500
internal error. And I'm not sure how it would know how to fill out
the URL if it did work i.e. How it would change "/ourapp/newpage.jsp"
to http://ourserver:7001/ourapp/newpage.jsp?
Other ideas is to have a central .jsp page which you would pass the
name of the dialog .jsp you want to open, and let it do the work for
you. But I can see this being very messy.
The only other idea I have is to try and overide the struts request
processer, but I'm new to struts and don't know if this is achievable.
As I'm new to Struts, I'm sure I am missing something!
Any help appreciated, Many Thanks
John Pailing