I am building a new template for displaying online help.
I have a search field in the toolbar and the first page which calls dhtml_search.htm and in turn dhtml_search.js with two functions that search an array and return results,
function show_results()
function search()
Searching in the toolbar works fine.
However, the same search function doesn’t work when called in the first page, I get an error on line 65 of dhtml_search.js:
object required
I can’t figure out why.
The error is on line 65 when you do this:
You actually are “replacing yourself” with your ‘all_content’ variable.
This is the structure:
The code you are executing is in the iframe[name=search_body] and your script erases all the content in the parent div#body_right so you are destructing your own execution context.
It works in the toolbar because at that time your code does not execute from the iframe[name=search_body] but from the toolbar frame.
Hope i’m clear 🙂