Click to See Complete Forum and Search --> : milti form page
peetcool9
11-08-2003, 07:46 PM
hello, i am new to this form and i ahve been trying to figure out how to make a order form. i have it all in one list but to make it look nice i would like to break it down into hidden sections. i already know how to hide them but they stay where they are and i would like it to shift it all up to the next instead of having a big blank area on the page.
ex if they select they want to order a quilt pillow and mattress, the page would only show those fields and they would all be one after the other. hope you understand. thanks for the help. Pat
noahd1
11-08-2003, 07:55 PM
If you don't set the style on the section to "display:none" it will take up space on the page even if you hide it. Hope that helps.
peetcool9
11-09-2003, 02:34 AM
thanks, i can now hide it on click and it works great but now i get a bunch of errors. i did not write this code but i tried to update it but i think i did some wring calls as it gives me errors everywhere.
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
function loadfunction() {
hidelayer('PersonalInfo')
showlayer('DownQuilt')
showlayer('DownQuillow')
showlayer('DownPillow')
showlayer('Covers')
showlayer('FeatherMattress')
}
function hidelayer(lay) {
if (ie4) {document.all[lay].style.visibility = "hidden";}
if (ns4) {document.layers[lay].visibility = "hide";}
if (ns6) {document.getElementById([lay]).style.display = "none";}
if (ie4) {document.all[lay].style.display = "none";}
if (ns4) {document.layers[lay].display = "none";}
if (ns6) {document.getElementById([lay]).style.display = "none";}
}
function showlayer(lay) {
if (ie4) {document.all[lay].style.visibility = "visible";}
if (ns4) {document.layers[lay].visibility = "show";}
if (ns6) {document.getElementById([lay]).style.display = "block";}
if (ie4) {document.all[lay].style.display = "inline";}
if (ns4) {document.layers[lay].display = "inline";}
if (ns6) {document.getElementById([lay]).style.display = "inline";}
}
// End -->
</script>
and i call loadfunction with
<body onload="javascript:loadfunction()">
it will not let me show the code when i press my button calling the sho function. what is wrong. thanks for the quick reply