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 = "";
var returnValueDialog  = window.showModalDialog(sURL, "", "dialogWidth:9cm; dialogHeight:6cm; status:yes")
alert("returnValueDialog: "+returnValueDialog);

Open in new window

Who is Participating?
objectsConnect With a Mentor Commented:
the url needs to be relative to the url of thae page that code pappears in

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.