Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I got problem when I was usi

Status
Not open for further replies.

Adhie

Programmer
Mar 17, 2003
28
0
0
SG
Hi,

I got problem when I was using window.showModalDialog. Please refer to
on that sample we able to pass paramenters from opener to modal page. Now, how to passed back those parameters form modal page to opener page. Let's say I'd like modify the value by opening modal page?
 
Adhie,

a modal dialog is meant to return a value.
e.g.
var returnVal = showModalDialog();

you would simply use the return value to do what you want

=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Hi, thank you.

you had inspired me to do something, here ...

default.htm
-----------
<script>
function myvalue(){
var arr = showModalDialog(&quot;modaldialog.htm&quot;,&quot;&quot;,&quot;&quot; );
if (arr != null) thevalue.innerText = arr;
}
</script>
<button onclick=&quot;myvalue();&quot;>Show ModalDialog</button>
<br>
<span id=&quot;thevalue&quot;></span>

modaldialog.htm
---------------
<form name=&quot;one&quot;>
<input type=&quot;text&quot; name=&quot;theone&quot; width=&quot;20&quot; value=&quot;here&quot;>
</form>
<script>
function revalue(){
window.returnValue = document.one.theone.value;
window.close();
}
</script>
<button onclick=&quot;revalue();&quot;>Close</button>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top