Showmodaldialog return value undefined

V

Venkat Chellam

HI all,

I am finding a very peculiar problem. I have two pages. From the first
page on button click i have javascript function which it turn opens
modal dialog box with second page as a parameter to it. From the
second page, when i click ok, i set some return value to the window
and then want to retieve the return value from the fist page where
showmodaldialog was called. but the return value always shows
undefined? does anyone came across this problem or have any other
solution to work on this?


venkat
 
L

Laiju Skaria

Hello Venkat

U can append the following line of code at the end of the click event of the
second page. somemethod is a client script in the first page...

Response.Write("<script
language='javascript'>opener.somemethod("passurstringhere"; self.close();
</script>") ;

hope this will help u and do let me know if u need some more help...

with best regards..
Laiju
 
V

venkat chellam

I still didn't understand how is it going to help me. how would the
first page receive the return value?

venkat
 
B

bruce barker

what did you set window.returnValue to in the modal window?

only scalers are supported, as any objects will be destroyed when the modal
window is closed (and this be undefined). if you need to pass an object
back, you need to call a routine in the opener window to clone it, so the
object(s) will still exist.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top