how to return 2 values using showModalDialog?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perhapscwk
    New Member
    • Sep 2007
    • 123

    how to return 2 values using showModalDialog?

    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.

    Code:
    function openModal() { 
    retVal=showModalDialog('popup.htm');
    valReturned=retVal;
    alert('The following text has been returned: "'+valReturned+'"');
    }
    thanks.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    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

    Comment

    Working...