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 strongm 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,

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