IntelliJ Java IDE
The moose likes HTML, CSS and JavaScript and the fly likes window.showModalDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "window.showModalDialog" Watch "window.showModalDialog" New topic
Author

window.showModalDialog

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi all,

I'm using a Modal window to list some values from database.
the code I used is
window.showModalDialog("/raj/pages/attachPO.jsp","Dialog Box Arguments # 1","dialogHeight: 200px; dialogWidth: 300px; dialogTop: 250px; dialogLeft: 500px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;");
i want to get the value I selected from the modal window in the opener page..
when i used the code
opener.document.frmname.txt1.value = 'somevalue';
Im getting the script error
opener.document is null or not an object.
if i use
window.open("/raj/pages/attachPO.jsp")
it works properly..
how can i make it working on Modal window..
can any1 help me ??
Thanks,
raj

SCJP2


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
modal only works with IE if you did not know that,,,
off the top of my head, might try parent.blahhhhh
I will look into it tomorrow when I am actually awake and sober.
Eric
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi Eric,
yep, im using IE 5.5..
hope u will wake up soon and bring the smile back .. lol.
Thanks,
raj

SCJP2
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
I knew I had the link...look at this
http://www.webreference.com/js/column90/8.html
what you really want is on the next page, but that is where it starts.
Eric
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Thanks Eric,
hurray its working !!!
Thanks,
raj

SCJP2
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
alot more work for a modal window! Not as easy as window.opener!!!
Glad it helped
 
 
subject: window.showModalDialog
 
Threads others viewed
IE: window.opener is null
can applet call javascript function?? HOW??
Hiding title bar
Some General Questions.
Modal dialog for a popup
IntelliJ Java IDE