Welcome, Guest. Please login or register.
March 20, 2010, 02:31:00 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem Website Baker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite .
110531 Posts in 15963 Topics by 9309 Members
Latest Member: garugc
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  Search module: help with javascript
Pages: [1] Go Down Print
Author Topic: Search module: help with javascript  (Read 438 times)
bgg

Offline Offline

Posts: 101



« on: October 03, 2008, 01: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

Offline Offline

Posts: 3579


« Reply #1 on: October 03, 2008, 03:09:26 PM »

Hello,

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

Regards Christian
Logged
bupaje

Offline Offline

Posts: 473


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

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

bgg

Offline Offline

Posts: 101



« Reply #3 on: October 03, 2008, 08: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.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!