OnFocus Event for Form Fields

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

    • Jun 2006
    • 851

    OnFocus Event for Form Fields

    Hello my fair Vodalians,

    I have a question in reference to this form http://www.designsbymapillar.com/form.html. As you can see, I have the names of the forms as the initial texts. I would like to know how to have those texts automatically erased when the filler clicks or tabs to each of the fields. I am aware that I have to have an OnFocus event set up, it's just that I've been toying with it for a while now with no success. Any help from any of you out there in Vadaland will be greatly appreciated.
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: OnFocus Event for Form Fields

    Click on the field that you want to have cleared when you place the mouse in. Select HTML, then click on "Inside Tag" and paste in the window to following code:

    onFocus="if(this.value!='')this.value='';"
    Please copy / paste the code from here, as what you see after the word "value" is NOT " but two ' .
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • AmaDee
      Colonel

      • Jun 2006
      • 851

      #3
      Re: OnFocus Event for Form Fields

      thanks, Naval.

      Comment

      • AmaDee
        Colonel

        • Jun 2006
        • 851

        #4
        Re: OnFocus Event for Form Fields

        I just did the changes and all but the first field works. I guess it's the tabbing enables the command?

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: OnFocus Event for Form Fields

          Please provide a link to the form
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • AmaDee
            Colonel

            • Jun 2006
            • 851

            #6
            Re: OnFocus Event for Form Fields

            www.designsbymapillar.com/form.html

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              #7
              Re: OnFocus Event for Form Fields

              You already have another piece of javascript there (field "name") and they will not work both: onfocus="ShowObject('', 1);return false;"
              Navaldesign
              Logger Lite: Low Cost, Customizable, multifeatured Login script
              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

              Comment

              • AmaDee
                Colonel

                • Jun 2006
                • 851

                #8
                Re: OnFocus Event for Form Fields

                So right. That's from when I was messing around with the new onFocus event thingymajig. It's working great now, thanks.

                Comment

                Working...
                X