Hi all,
Just a minor issue, I know, but I wondered if anyone else finds it annoying that you have to manually select the text in the Search box to enter your search text? I was thinking there's a "focus" method for a textbox that automatically selects the contents of the box...is it possible to use that?
I tested this in both IE6 on XP and Firefox on XP and Linux, and it acts the same. Anyone know of a quick fix for this?
Thanks in advance,
Eric Imboden (i5n)
search module -- can you set focus when entering search box?
-
3dc
Re: search module -- can you set focus when entering search box?
hi,
quick n dirty-version:
in the template you use
after
add this:
I also tried , but somehow it didnt work. I was reading a few webpages which said it has something to do with the order of the forms in the html. I also dont know the magic behind the ids - like "cnt01"(for example, look at /modules/Search/action.default.php)... but the above example should work... quickndirty as i said.
Greetz - ~3DC~
quick n dirty-version:
in the template you use
after
Code: Select all
<div id="search">
{search}
</div>Code: Select all
<__script__ type="text/javascript">
document.forms[0].cntnt01searchinput.focus();
document.forms[0].cntnt01searchinput.select();
</__script>Greetz - ~3DC~
