Quote:
Originally Posted by Boofo
How do we add the trim code to this? 
|
To add trim you'd do something like this:
Code:
function trim(str) {return str.replace(/^\s+/,'').replace(/\s+$/,'');}
function showFind(element) {
if(trim(element.value) != '') {
And then carry on as before.
As regards your quotes bug, it isn't apparent on my site using Firefox and IE6 to test with.