A new JavaScript search
This has probably been done before, but check out my ajax-like search! Very easy code, it just uses the text on the page. But you can rewrite it to talk to php scripts, I guess I will do this later, and perhaps explain the code a little.
And please comment if some of the code should be changed for better appearance. I can see that the divs don’t float the way they should. I will check this later.
UPDATE: works now in IE. The reason it didn’t work was that document.getElementsByName() isn’t working in IE (at least IE7). I found a fix and implemented it.
“I can see that the divs don’t float the way they should.”
Change this:
quotes[i].style.visibility=”visible”;
to this:
quotes[i].style.display=”block”;
and this:
quotes[i].style.visibility=”hidden”;
to this:
quotes[i].style.display=”none”;
Thanks Mike, I appreciate this. I’m not on my own computer right now but i’ll change it later.