View Full Version : problem in coding
sukanya.paul
09-05-2007, 03:09 AM
i have a form in which i have a checkbox.. when i click on the ckeckbox a list has to be displayed,when the checkbox is not clicked the list is hidden..this is happening but the problem is der is a blank space in place of the list whn the checkbox is not clicked..i dont want this space..i have used tables the list is placed insde a row..is der a way to make the entire row ivisible whn the page loads or whn the box is unchecked and it be displayed only whn the box is checked?
pls help..
tkanks in advance..
codeexploiter
09-05-2007, 03:37 AM
I think you've probably used "visibility" property to hide the list. Try the "display" property instead of "visibility" property.
Eg:
<div style="display:none" id="hid"></div> This hides the div
document.getElementById('hid').style.display = 'block' This will make the hidden element visible. Please note that the value 'block' will treat the element as a block element. You can change it to a value that is applicable to your needs, Possible values are (http://www.w3schools.com/css/pr_class_display.asp)
sukanya.paul
09-05-2007, 03:39 AM
thanks :) but is der any method to hide the row??i'm not using div here..
codeexploiter
09-05-2007, 03:57 AM
You can hide a div element (any element) using the following method.
document.getElementById(id_of_the_element).style.display = 'none';
The important decision you need to make when you make the element unhide as you can make the element display different based on the values I've provided in my earlier post. Please check those values and also you can find some examples of the same in it.
Hope this helps.
sukanya.paul
09-05-2007, 04:05 AM
thanks again :) will keep u posted if it works
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.