We help IT Professionals succeed at work.

showModalDialog

barnetjeb
barnetjeb asked
on
578 Views
Last Modified: 2007-12-19
I'm using VB.Net and some javascript.  I'm trying to use a modal screen.

My main form has a button which calls a javascript function with the following code:
var retval=""
retval=window.showModalDialog('mypage.htm')

Inside my modal form I have a button.  When clicked it calls the javascript function which has the code:
top.returnvalue='myvalue'
top.close

I try to alert retval and I always get undefined.  If I remove the top.close I always get 1.  What am I doing wrong?  I have my modal aspx form within a frame on a html page.

Thanks
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Nope I still get undefined.

Author

Commented:
I fixed it!!!!  I was being an idiot.

returnvalue <> returnValue

Spent a day over a capital V
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.