troodont
08-27-2003, 02:49 PM
I am running frames with 3 panes. On one pane, I have a search box that permits searching on another pane (URL is "index1.html" and Target is "Index Frame"). For years, my search feature worked fine for IE4 and above and for NE4 (since then, I've become rusty at javascript). This javascript code had:
var IE4P=(document.all);
var NS4P=(document.layers);
Here I aso define win as:
var win=parent.frames["Index Frame"];
For searching when the browser is Netscape. Problem is that while it works great for all versions of IE I've tested it on, as well as Netscape 4.xx, I can't get it to work with any other Netscape versions.
To try to correct this problem, I also tried:
var bN=navigator.appName;
followed later by:
if (bN=='Netscape') ...
but with the exact same results as using NS4P.
I am trying to update my search capability to handle all browsers (if possible). On this wonderful website, I just found a search engine that defines win as:
win = window.open("","","scrollbars");
I modifed this code to:
win = window.open("index1.html","Index Frame","scrollbars");
It seems to me that this change should work, but it does not. Now, all I get is a beep, but no search, even when the search text is something common to all panes.
What is the best solution here? Should I use the older version and define new variables for Netscape (e.g. NS6P for Version 6.xx) and then do:
if (NS4P||NS6P) ...
Or am I doing something wrong in pointing to the Index Frame using the new code that can be reasonably rectified?
Or is there some other way I can define win that works with framed webpages?
Thanks. Troodont
var IE4P=(document.all);
var NS4P=(document.layers);
Here I aso define win as:
var win=parent.frames["Index Frame"];
For searching when the browser is Netscape. Problem is that while it works great for all versions of IE I've tested it on, as well as Netscape 4.xx, I can't get it to work with any other Netscape versions.
To try to correct this problem, I also tried:
var bN=navigator.appName;
followed later by:
if (bN=='Netscape') ...
but with the exact same results as using NS4P.
I am trying to update my search capability to handle all browsers (if possible). On this wonderful website, I just found a search engine that defines win as:
win = window.open("","","scrollbars");
I modifed this code to:
win = window.open("index1.html","Index Frame","scrollbars");
It seems to me that this change should work, but it does not. Now, all I get is a beep, but no search, even when the search text is something common to all panes.
What is the best solution here? Should I use the older version and define new variables for Netscape (e.g. NS6P for Version 6.xx) and then do:
if (NS4P||NS6P) ...
Or am I doing something wrong in pointing to the Index Frame using the new code that can be reasonably rectified?
Or is there some other way I can define win that works with framed webpages?
Thanks. Troodont