By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

how to return 2 values using showModalDialog?

100+
P: 123
I use below to popup a page "popup" and then pass the value from popup
and back to my page. see below

However, how to return 2 values? I can return 1 value only.

Expand|Select|Wrap|Line Numbers
  1. function openModal() { 
  2. retVal=showModalDialog('popup.htm');
  3. valReturned=retVal;
  4. alert('The following text has been returned: "'+valReturned+'"');
  5. }
thanks.
Dec 8 '08 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
you can't return two values, only one. you could work around that by using arrays or object and extract back the desired values.

regards
Dec 8 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.