Forum Moderators: coopster & phranque

Message Too Old, No Replies

Does anyone here have a script for this?

The prompt needs to be in the search box

         

SEO practioner

5:20 pm on Jun 12, 2003 (gmt 0)

10+ Year Member



I think I have seen something like this before but I can't seem to find it...

I am putting a search box on the homepage of one of the websites I take care of and I would like it if the search prompt would always be (by default) inside the search box, instead of always having to put it there manually everytime.

Has anyone seen a script or something that will do that for me? It's just a regular html site, no php, no java... just as straight as they come.

Just like Google does it...

Thanks

brotherhood of LAN

5:22 pm on Jun 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



> Just like Google

There's a javascript on their home page I believe, if you copy that it should do the trick

something to do with "onload" or something like that, I don't touch the stuff ;)

cminblues

2:43 am on Jun 13, 2003 (gmt 0)

10+ Year Member



Yes.
From Google home [deleted code not relevant :)]:

<script>
<!--
function sf(){document.f.q.focus();}
// -->
</script>
..
<body onLoad=sf()>
..
<form action="/search" name=f>
..
<input name=q value="">
..
</form>
..
</body>