Adding events - Hide Function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • jacobhebert
    Staff Sergeant

    • Jan 2008
    • 44

    Adding events - Hide Function

    I'm actually using this function for a form, but the idea is universal. I have my form set up so that the Submit button is hidden by clicking on something early on in the form, and then shown again once the terms and conditions checkbox is checked.

    My question is, how can I load the page with an element on that page already hidden so that I don't have to set an event to hide it. If anyone needs further explanation I can give you an example of the form I created. Thanks!
    Jacob Hebert
    Lake Conroe Real Estate
  • Watdaflip
    Major General

    • Sep 2005
    • 2116

    #2
    Re: Adding events - Hide Function

    It would depend on how the button is being hidden, but guess is it is just changing a css attribute

    Adding something to the button's html like

    style="display:none" will make it so it doesn't show on page load, but I can't say for sure if the function will properly make it appear

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment

    • jacobhebert
      Staff Sergeant

      • Jan 2008
      • 44

      #3
      Re: Adding events - Hide Function

      That script did work to keep the button from being displayed on page load, but then it wasn't able to reappear based on the "show" event.
      Jacob Hebert
      Lake Conroe Real Estate

      Comment

      • Watdaflip
        Major General

        • Sep 2005
        • 2116

        #4
        Re: Adding events - Hide Function

        Post the code (I assume javascript) you are using and I might be able to find a solution

        Register/Login Script
        Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

        Comment

        • gonosgon
          Private

          • Apr 2008
          • 3

          #5
          Re: Adding events - Hide Function

          Hello,

          I have the same problem. I want some object to be shown when a button is pressed. Which means that I need this object to be hidden when the page is loaded. I tried the "style="display:none"" thing but the result is the same. The object is hidden but it doesn't reappear based on the "show" event.

          Could you please advice how to solve it?

          Thanks in advance

          gonosgon

          Comment

          • Watdaflip
            Major General

            • Sep 2005
            • 2116

            #6
            Re: Adding events - Hide Function

            .. Post the link to the page or the javascript you are trying to use to display the object.

            Register/Login Script
            Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

            Comment

            • gonosgon
              Private

              • Apr 2008
              • 3

              #7
              Re: Adding events - Hide Function

              Hi, thanks for your prompt reply.

              Here's the description of my problem:
              www.hodinka.sk/picture.jpg

              And here's the code:
              www.hodinka.sk/preview.html

              Comment

              • Watdaflip
                Major General

                • Sep 2005
                • 2116

                #8
                Re: Adding events - Hide Function

                You don't have any javascript code to make it reveal or hide.

                I would suggest looking though the menu available at dynamicdrive


                It will give you all of the code you need to it to work

                Register/Login Script
                Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

                Comment

                • gonosgon
                  Private

                  • Apr 2008
                  • 3

                  #9
                  Re: Adding events - Hide Function

                  ok, I'll try. thanks a lot for your help.

                  Comment

                  Working...
                  X