Do piecewise functions have parent functions?

Can I call functions in a modeless dialog from the parent

  • Is there anyway to call functions of a modeless dialog (in IE) from the parent window that spawned the dialog? I'd like the user to be able to click on items in the parent window in order to change some data in the dialog upon which they can then perform actions. Also I'm not quite sure what the difference is between opening a new window with window.open vs window.showModelessDialog and when I'd use one over the other. Thanks!

  • Answer:

    Sure. Here's 2 pages. I've bolded the working parts. mainPage.html<html><head> <title>I am the main page</title></head><body><h1>I am the main page.</h1><p>I am data.</p><p><button onclick="window.showModelessDialog('dialogPage.html', window);">I am a button</button></p><p id="displayArea">I can be updated.</div></body></html>dialogPage.html<html><head> <title>I am a dialog page</title> <script> window.onload = function(){ document.getElementById('updateButton').onclick = function(){ var openerWindow = window.dialogArguments; var dialogValue = document.getElementById('someText').getAttribute('value'); openerWindow.document.getElementById('displayArea').innerHTML = dialogValue; }; }; </script></head><body><h1>I am a dialog page</h1><p><input type="text" value="Some Text." id="someText"></p><p><button onclick="" id="updateButton">Update</button></p></body></html>

zeoslap at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

I was after the reverse of that - but thanks.

zeoslap

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.