Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing indexes when pdf is closed

Status
Not open for further replies.

NateUNI

MIS
Jan 3, 2002
132
US
I am looking for javascript that will remove indexes when a pdf is closes. I have looked at removeindex under the search object but have failed to get it to work. Any help would be appreciated, Thanks!
 
right now i have the following code:

for (var i = search.indexes.length; i >= 0; i--) {
if (search.indexes.name == "All Indexes"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Dairy"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Aquaculture"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Beef"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Equine"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Laboratory"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Pet Food"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Poultry"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Sheep and Goat"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Swine"){
search.removeIndex(search.indexes);
}
if (search.indexes.name == "Updates"){
search.removeIndex(search.indexes);
}
}

however im still receiving this error;

TypeError: search.indexes has no properties

Any ideas?? Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top