-3

I have an HTML web page that openes a DHTMLWindow, and I want to send that window a parameter from the 'fater' HTML web page, so the DHTMLWindow would be able to pass it on to one of it's 'son' windows.

How can I send parameter to DHTMLWindow?

Or, maybe, is there a way to replace that DHTMLWindow with regualar popup window openened with window.open command?

Really need your help, Tal.

  • The meaning of 'fater' is parent ? And 'son' is child ? – OammieR Mar 15 '12 at 09:32
  • What I mean is, that now, from the HTML page I built, when I press Ctrl+Alt+D, the DHTMLWindow will be opened, and on that DHTMLWindow, there are few buttons, that opens regular pop up windows. I want, if poosible, to transfer parameter from the first HTML page that I built, to the DHTMLWindow, and from him to the popup windows that can be opened from him. – Tchernihovski Tal Mar 15 '12 at 09:37
  • sorry but I don't understand, does the DHTMLWindow is the new tab page ? – OammieR Mar 15 '12 at 09:48
  • no, it's not opened as a new tab but like a popup window – Tchernihovski Tal Mar 15 '12 at 09:55
  • I need an answer whether I can send parameters from URL to standard DHTMLWindow – Tchernihovski Tal Mar 15 '12 at 14:27

1 Answers1

0

You can use window.opener to access the parent page.

First, create function at first page to pass parameter to child page like this.

Mainpage.html

<script type="text/javascript">
function sentParam()
{
    return "param receive";
}
</script>

and the child page

ChildPage.html

<script type="text/javascript">
    var paramGet = window.opener.sentParam();
    alert(paramGet);
</script>
OammieR
  • 2,800
  • 5
  • 30
  • 51