[eluser]Mike DeFelice[/eluser]
Ahh it seems the forum is just removing the part of the code.
After maxlength="30" add
onkeyup="lookup(this.value);"
Hi Wayne, sorry about that some of the code got removed on my end
Code:
<form action="<?php echo base_url() . 'search/'; ?>" method="post">
<input type="text" name="search" maxlength="30">
<input type="submit" value=""/>
</form>
The onkey="lookup(this.value);" will grab the search box value and pass it to the function.
the neat thing about jQuery is that you can grab the value of the current field being called. For instance not a great example, but say I made a jQuery function so when I clicked on this link it would show an alert message with the rel="Wayne" value.
Code:
<a href="" class="clickme" rel="Wayne"></a>
then when you click your jQuery can use $(this).attr("rel") would get the value "Wayne", useless example but hope it does the job