showModalDialog icon indicating copy to clipboard operation
showModalDialog copied to clipboard

How to pass back a value

Open stevyrino opened this issue 4 years ago • 1 comments

I am trying to make an old IE form work with a showModalDialog. This worked well with IE. I have a modal form that, based on a selected criteria, makes a request to a database for a primary key. I can't figure out how to pass that value back to the parent form. I figure I have to stuff it somewhere but in the original code it was done with "window.returnValue = key;". This does not work with the polyfill. Any help would be appreciated. I am thinking the polyfill should be a direct replacement for the old IE showModalDialog. Parent form: (function() {
pParty = window.showModalDialog("../Search.htm", "SearchParty", "resizable:yes;status:no;dialogHeight:550px;dialogWidth:600px"); })();

Dialog prior to clicking on close button: var arr = new Array(getHTMLText(mRow.cells[1]), getHTMLText(mRow.cells[2]), getHTMLText(mRow.cells[3])); window.returnValue = arr;

stevyrino avatar Mar 08 '20 06:03 stevyrino

PS: I am using Chrome browser.

stevyrino avatar Mar 08 '20 06:03 stevyrino