• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1497
  • Last Modified:


I'm trying to use window.showModalDialog to open a jsp that uses struts but I'm having problems getting the url right. See code snippet below. This code opens a window, but not to the correct url and when I close the dialog box  the alert reads returnValueDialog: undefined. Any help would be greatly appreciated.
sURL = "Request.do?parameter=someParameter";
var returnValueDialog  = window.showModalDialog(sURL, "", "dialogWidth:9cm; dialogHeight:6cm; status:yes")
alert("returnValueDialog: "+returnValueDialog);

Open in new window

1 Solution
the url needs to be relative to the url of thae page that code pappears in


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now