it disappears

D

davidrossdegroot

Hello, When I use this script it works fine, however, when I add a
link, by inserting a new "pageLink" in the array, and then it
dissappears on the screen... any ideas?

Thanks,
D.

var pageLinks = Array();
pageLinks[0] = "home";
pageLinks[1] = "a";
pageLinks[2] = "b";
pageLinks[3] = "c";
pageLinks[4] = "d";
pageLinks[5] = "e";
pageLinks[6] = "f";
pageLinks[7] = "g";
pageLinks[8] = "h";
pageLinks[9] = "organiz";
pageLinks[10] = "site";
pageLinks[11] = "notices";

function hideThisLink() {
var thisPage = unescape(window.location.href);
var linksLength = pageLinks.length;
for (i=0; i<linksLength; i++) {
var objectID = pageLinks;
var thisLink = findDOM(objectID,0);
var pathName = unescape(thisLink.pathname);
if (thisPage.indexOf(pathName)>-1) {
thisLink.style.display = "none";
}
}
}

document.writeln('<a id="home" href="index.htm"
style="display:inline">Home</a><br><br>');
document.writeln('<a id="a" href="a.htm" style="display:inline">A</
a><br><br>');
document.writeln('<a id="b" href="b.htm" style="display:inline">B</
a><br><br>');
document.writeln('<a id="c" href="c.htm" style="display:inline">C</
a><br><br>');
document.writeln('<a id="d" href="d.htm" style="display:inline">D</
a><br><br>');
document.writeln('<a id="e" href="e.htm" style="display:inline">E</
a><br><br>');
document.writeln('<a id="f" href="f.htm" style="display:inline">F</
a><br><br>');
document.writeln('<a id="g" href="g.htm" style="display:inline">G</
a><br><br>');
document.writeln('<a id="h" href="h.htm" style="display:inline">H</
a><br><br><br>');
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,147
Messages
2,570,835
Members
47,382
Latest member
MichaleStr

Latest Threads

Top