WordPress.org

Forums

search field how to make text dissapear when clicked? (4 posts)

  1. sophie
    Member
    Posted 3 years ago #

    im a complete newbie, whats wrong with my searchform.php, when the search field is clicked, the text doesnt dissapear. my website is flipshion.com, thanks.

    searchform.php:

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div>
    <input type="text" value="S e a r c h F l i p s h i o n" name="s" id="s" onfocus="if (this.value == 'S e a r c h F l i p s h i o n) <input onfocus="this.value = '';}" onblur="if (this.value == '') {this.value = 'S e a r c h F l i p s h i o n';}" />
    </div>
    </form>

  2. Raby Yuson
    Member
    Posted 3 years ago #

    <input type="text" value="S e a r c h   F l i p s h i o n" name="s" id="s" onfocus="if(this.value=='S e a r c h   F l i p s h i o n')this.value='';" onblur="if(this.value=='')this.value='S e a r c h   F l i p s h i o n'">
  3. sophie
    Member
    Posted 3 years ago #

    thankyou so much raby works perfectly!!

  4. sophie
    Member
    Posted 3 years ago #

    hey raby, do you know how i could put this search bar in the nav bar beside my links on the right side? please be specific about which files to edit since im a newbie.. thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic