PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Quick Question - text prompt in search box

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick Question - text prompt in search box

    Hi, just purchased the Zoom Search software....and so far I'm pretty happy with it....I just have a quick question here...

    I have a search box placed on the main site. I also have the initial value set to "Search" this way people know what that box does.

    Well, I'm trying to set it so when a user clicks on the box, the "search" text clears from the textbox instead of the user having to manually enter backspace and type their "search query" again.

    I have something along the lines of this in my code:
    <input type="text" name="zoom_query" size="20" style="width: 80px; height: 17px" value="Search" onclick=" />

    I just don't know what to set the onclick value to, i've tried "", no success.

    Thanks for the help!

  • #2
    Take a look at this previous forum thread, I think it'll do what you want?
    http://www.wrensoft.com/forum/showthread.php?t=1529
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      That is what I'm looking for, however that coding Doesn't seem to work.

      Comment


      • #4
        But this seemed to work for me, changed it up a little bit:
        HTML Code:
        <input type="text" name="zoom_query" size="20" style="width: 80px; height: 17px" value="Search" onfocus="if ( this.value == this.defaultValue ) this.value = ''"
        onblur="if ( this.value == '' ) this.value = this.defaultValue" >

        Comment

        Working...
        X