I have a web page with a <DIV> set up to receive an 'external' HTML page and display it.
The 'Child' HTML page content is loaded into the <DIV>'s innerHTML to be displayed.
Think of this as the 'Parent' page displaying the 'Child' page within the specified <DIV>
In general this is working fine.
But I also have a Search function which searches the text within these 'external' HTML pages to see if it can find a file which contains the text.
When/If one or more 'external' documents are found a new SearchResults.htm web page is created and loaded into the <DIV>'s innerHTML - thereby displaying the findings (think of a Google search findings).
These findings are listed as links - each with its own onclick() defined.
'Child' Page Link Example:
Within the 'Parent' page I have the link's associated Javascript function ( DisplayDocument() ) which is supposed to execute when a 'Child' page link is clicked.
But it seems as though the 'Child' page onclick()'s cannot find the js function residing in the 'Parent' page.
It seems as though it is trying to find the js function within the 'Child' page instead of within the 'Parent' page.
Is this 'normal' and how can it be resolved?
Thanks,
JRB-Bldr
The 'Child' HTML page content is loaded into the <DIV>'s innerHTML to be displayed.
Think of this as the 'Parent' page displaying the 'Child' page within the specified <DIV>
In general this is working fine.
But I also have a Search function which searches the text within these 'external' HTML pages to see if it can find a file which contains the text.
When/If one or more 'external' documents are found a new SearchResults.htm web page is created and loaded into the <DIV>'s innerHTML - thereby displaying the findings (think of a Google search findings).
These findings are listed as links - each with its own onclick() defined.
'Child' Page Link Example:
<a href = "#" onclick = "DisplayDocument('1-Disposition-4-Generate Single Letter.htm')" href = "#">Disposition-Generate Single Letter</a>
Within the 'Parent' page I have the link's associated Javascript function ( DisplayDocument() ) which is supposed to execute when a 'Child' page link is clicked.
But it seems as though the 'Child' page onclick()'s cannot find the js function residing in the 'Parent' page.
It seems as though it is trying to find the js function within the 'Child' page instead of within the 'Parent' page.
Is this 'normal' and how can it be resolved?
Thanks,
JRB-Bldr