Re: Folding closed space for a hidden form
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Folding closed space for a hidden form

From: web_design <web_design@doijwakfjasilfasfsaf.com>
Date: Thu Aug 11 2005 - 21:48:28 CEST

"Martin Kurz" <info@martinkurz.in-berlin.de> wrote in message
news:1123788742.201128@elch.in-berlin.de...
> Hello,
>
> web_design schrieb:
>> I'm making a form that is hidden until someone clicks on a link to open
>> it.
>> I can hide the form, but there is just a large white space on the screen
>> where the form is hiding. Is there any way to close the white space when
>> the form is not showing? At the moment I'm using a <div> and hiding the
>> visibility, and then making it visible when the link is clicked:
>>
>> <div id="form" style="visibility: hidden; etc...
>
> Just set the divs display to none instead of visibility to hidden, that's
> all.
>
> Some Background: Visibilty just makes the div invisible without taking the
> room,
> the div would take if it would be visible. A div is a block-Tag, so you
> can
> switch a div on and off by setting display to block or none.

Thanks for that tip. It works great.

Do you know if there is an easy way to set my link to *toggle* the display?
Right now I have a link that shows the form, but to close it I had to make a
separate button on the form. I'd prefer that someone could click on the
link to open it, and then click again to close it.

This is my link:
<a href="javascript://" onClick="showform('commentform')">
Received on Tue Oct 18 03:07:49 2005