Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Feedback on: irt.org FAQ Knowledge Base Q171, October 18, 2000 at 09:00:24:

You are here: irt.org | About | Feedback | 1878 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q171

Sent by
Eric on October 18, 2000 at 09:00:24:

Worth reading

Found script useful but would suggest a few improvements:

1. Most of the stuff in the else section of the top script was unnecessary, all it really needed to do was reset pos to 0. Would also have been nice to have added an alert to tell the user that the item wasn't found. I added two, one that came up if there'd been a previous find and one if not. Mine looked like this this (though note that my form name is different):
if (pos == '0') alert('"' + document.searchform.searchtext.value +'" was not found on this page.');
else alert('No further occurences of "' + document.searchform.searchtext.value +'" were found.');

Also, if you search for something and it IS found, the variables are not reset. This is appropriate if one searches for the same item again, but if one types a new item into the search field, they still aren't reset, so you get inappropriately told that the new item isn't found... need to find a way to reset this if one changes the search string.

Other feedback on 'irt.org FAQ Knowledge Base Q171' - show all

©2018 Martin Webb