I have used a script to open a drop down link in a window from another hyperlink.
I use the hyperlink:
topic_title.htm#2
to open the third drop-down hotspot on topic topic_title.htm.
In the topic with the drop-down hotspot, I use the following script:
<!–(Scripts)=======================================================–>
<script language=JavaScript><!–
/*
function getQueryNumber() {
query = ‘ ‘ + this.location;
// Get the current URL so we can parse out the data.
queryIndex = query.indexOf(‘#’)
if (queryIndex == -1) {
value = -1
}else{
value = query.substring(queryIndex + 1);
// Keep everything after the pound sign ‘#’.
}
return value;
}
function expandLinkedItem() {
var arrayofDivs = document.all.tags(“DIV”);
expandDiv = getQueryNumber();
if (expandDiv != -1){
arrayofDivs[expandDiv].style.display = “block”;
}
}
// –></script>
</head>
<!–(Body)==========================================================–>
<body onLoad=”setTimeout(‘expandLinkedItem();’,50)”>
However, I found that this recently stopped working in Netscape, Mozilla, and FireFox.
In FireFox I got two error messages:
1. On one line, it said to “Warning: Non-standard document.all property as used. Use W3C standard document.getElementById() instead. If you search the script above for “document.all” you will find this line only once.
I tried simply replacing “document.all” with “document.getElementById”, but that did not work. Instead I got the message “Error: document.getElementById.tags is not a function”
2. The second error I got for three lines down. It says, “arrayofDivs has no properties.
Any ideas how I adjust this script to work with FireFox, etc?
Thanks!!
Troy