View Full Version : DHTML Window widget (v1.02)

04-27-2007, 08:44 PM
1) Script Title: DHTML Window widget (v1.02)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

3) Describe problem: Not a problem with the script itself. Just one thing I need to do with it.

I have a function called from MainPage.html, which dynamically creates tables and populates them with strings from variables when the page loads. The arrangement looks like this:

<div id="insertarea">
<div><script type="text/javascript">insertThings(data1[2][0])</script></div>
<div><script type="text/javascript">insertThings(data5[8][3])</script></div>

Now, rather than populating MainPage.html, I would like the above strings to populate ChildPage.html that loads in the DHTML Window widget (I am using the iframe version). Hence, Can someone help me with a sample function that would:

1. access ChildPage.html from the MainPage.html (or MainPage.html from the ChildPage.html), when ChildPage.html loads, and

2. execute the two functions/strings above so as to have them populate an empty container, such as a div with id="receivedata", on ChildPage.html, when the latter loads in the Window widget.

I need to use a single Childpage.html that can be invoked by and loaded from any of the MainPages, if necesary; but ChildPage.html must have an empty container that can be fetched from data strings that are specific to the particular MainPage.html that loads it. Therefore, the above two data-fetching functions/strings must reside on their associated MainPage.html, or somewhere else, but not on the ChildPage.html.

A sample function would be hugely appreciated. Sorry for the length of this post.


04-28-2007, 08:52 AM
Never mind this post. Using the div option of the widget turned out to be an excitingly MUCH simpler approach.