View Full Version : Adding events - Hide Function

02-26-2008, 09:14 PM
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!

02-26-2008, 09:20 PM
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

02-26-2008, 09:46 PM
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.

02-27-2008, 01:20 AM
Post the code (I assume javascript) you are using and I might be able to find a solution

04-07-2008, 05:23 PM

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


04-08-2008, 01:10 AM
.. Post the link to the page or the javascript you are trying to use to display the object.

04-08-2008, 05:06 PM
Hi, thanks for your prompt reply.

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

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

04-08-2008, 05:10 PM
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

04-09-2008, 12:01 PM
ok, I'll try. thanks a lot for your help.