|
-
Feb 28th, 2005, 04:51 PM
#1
Thread Starter
Frenzied Member
PlaceHolder doesn't have an HTML ID
I want to have a section on a page that I can set the visibility to hidden through javascript and have the section collapse. I tried to use the PlaceHolder control but it doesn't generate an object on the client side - so I can't use document.getElementById.
Any ideas?
Last edited by wey97; Mar 1st, 2005 at 12:11 PM.
-
Mar 1st, 2005, 09:54 AM
#2
Frenzied Member
Re: PlaceHolder doesn't have an HTML ID
Would you be able to use a Panel element instead?
DJ
-
Mar 1st, 2005, 09:58 AM
#3
Thread Starter
Frenzied Member
Re: PlaceHolder doesn't have an HTML ID
I've already tried...you can hide the panel in javascript but the space it took up remains on the page - it doesn't collapse.
-
Mar 1st, 2005, 10:11 AM
#4
Frenzied Member
Re: PlaceHolder doesn't have an HTML ID
The Panel control generates a HTML div - if you have a width and height specified even if it isn't visible maybe it is still reserving the space. Have you tried hiding it and resizing it to 0 x 0?
DJ
-
Mar 1st, 2005, 12:11 PM
#5
Thread Starter
Frenzied Member
Re: PlaceHolder doesn't have an HTML ID
I tried what you suggested and that didn't work either.
Finally found that setting style.display = 'none'
will hide it and collapse the space.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|