Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 07:32:39 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149677 Posts in 21101 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Search module: help with javascript  (Read 669 times)
bgg

Offline Offline

Posts: 101



« on: October 03, 2008, 12:41:33 PM »

Here's my searchbox codes:
Code:
<form action="/search/" method="get" />
    <input class="search" name="string" size="15" value="type here.." onclick="(this.value=='type here to search') ? this.value = '' : false;" type="text" />
    <input name="submit" value="Go" type="submit" />
</form>

There is a default text in the search box: type here..

AND, while clicking on the input box, the text is suppose to vanish. BUT it is not happening.

What am I missing?

Thank you very much.
Logged
doc
Guest
« Reply #1 on: October 03, 2008, 02:09:26 PM »

Hello,

should be obvious: "type here.." and "type here to search" do not match ...

Regards Christian
Logged
bupaje

Offline Offline

Posts: 519


WWW
« Reply #2 on: October 03, 2008, 05:56:39 PM »

Code:
<input type="text" name="searchstring" value="Enter search term ..." maxlength="100" onclick="searchstring.select();" />
Logged

My Blog, My Site
bgg

Offline Offline

Posts: 101



« Reply #3 on: October 03, 2008, 07:19:49 PM »

Thanks Doc & Bupaje Smiley

Both works and of in intelligent way!
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!