The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    write Search.. in search box

    omarpop23
    omarpop23
    Forumember


    Male Posts : 182
    Reputation : 3
    Language : Arabic
    Location : Egypt

    In progress write Search.. in search box

    Post by omarpop23 May 29th 2016, 9:14 pm

    how can i writ Search... in this search box like this

    write Search.. in search box Untitl18


    Last edited by omarpop23 on May 31st 2016, 10:46 am; edited 1 time in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    In progress Re: write Search.. in search box

    Post by SLGray May 29th 2016, 11:00 pm

    Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.
    Please read our forum rules:  ESF General Rules



    write Search.. in search box Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: write Search.. in search box

    Post by Ange Tuteur May 29th 2016, 11:43 pm

    You can use one of the following scripts in all the pages.

    Option 1 :
    Uses an older placeholder method.
    Code:
    $(function() {
      $(function() {
        var fa_textarea = document.getElementById('fa_textarea');

        if (fa_textarea) {
          window.fa_textarea_placeholder = 'Search...';

          fa_textarea.value = fa_textarea_placeholder;

          fa_textarea.onfocus = function() {
            if (this.value == fa_textarea_placeholder) {
              this.value = '';
            }
          };

          fa_textarea.onblur = function() {
            if (!this.value) {
              this.value = fa_textarea_placeholder;
            }
          };

        }
      });
    });

    Option 2 :
    Uses the placeholder attribute.
    Code:
    $(function() {
      $(function() {
        var fa_textarea = document.getElementById('fa_textarea');

        if (fa_textarea) {

          fa_textarea.placeholder = 'Search...';

        }
      });
    });
    omarpop23
    omarpop23
    Forumember


    Male Posts : 182
    Reputation : 3
    Language : Arabic
    Location : Egypt

    In progress Re: write Search.. in search box

    Post by omarpop23 May 31st 2016, 10:51 am

    i tried this but does not work:(
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: write Search.. in search box

    Post by Ange Tuteur May 31st 2016, 4:57 pm

    I reviewed the scripts and there's no reason they shouldn't work, which leads me to believe the problem is from a script installed on your end. Please provide the URL of the forum you're installing this on, so I may inspect your forum.

      Current date/time is September 22nd 2024, 11:30 pm