Weese
Programmer
- Apr 3, 2003
- 17
Hai my code is like the below one.
**************************************************
<Html>
<head>
<title></title>
<SCRIPT LANGUAGE=javascript>
<!--
function DisplayNone(){
ID2.style.display = "none";
ID4.style.display = "none";
}
//-->
</SCRIPT>
</head>
<body id=bdy name="bdy">
<form name="frm">
<DIV ID="ID1" STYLE="position:absolute; left:10; top:10;width:300; height:15; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">Div ID1 Here </DIV>
<DIV ID="ID2" STYLE="position:absolute; left:10; top:30;width:130; height:28; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:8pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">Div ID2 Here </DIV>
<DIV ID="ID3" STYLE="position:absolute; left:185; top:30;width:100; height:28; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:8pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">Div ID3 Here </DIV>
<DIV ID="ID4" STYLE="position:absolute; left:10; top:60;width:100; height:20; background-color:#FFFFFF;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">
<INPUT NAME="A1" TYPE="text" STYLE=" position:absolute; width:100%; height:100%; background-color:#FFFFFF font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none; text-align: Right;" VALUE="1.000" Datatype="number" mask="" Decimal="3" MAXLENGTH="4">
</DIV>
<DIV ID="ID5" STYLE="position:absolute; left:185; top:60;width:100; height:20; background-color:#FFFFFF;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">
<INPUT NAME="A2" TYPE="text" STYLE=" position:absolute; width:100%; height:100%; background-color:#FFFFFF font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none; text-align: Right;" VALUE="1.000" Datatype="number" mask="" Decimal="3" MAXLENGTH="4">
</DIV>
<DIV ID="ID1" STYLE="position:absolute; left:10; top:90;width:300; height:15; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">
<INPUT NAME="B1" TYPE="button" style="width=120" value="Display" onClick="DisplayNone()">
</DIV>
</form>
</body>
</html>
****************************************************
In the above example when I click on Display button,
some piece of Div(ID2 and ID4) get disabled but I want the next piece(ID3 and ID5) should get adjusted into the place of ID2 and ID4.But since it is fixed with absolute position this not happening.I also cannot avoid absolute position since it is auto generated.
I there any way to do it.
Thanks in advance.
**************************************************
<Html>
<head>
<title></title>
<SCRIPT LANGUAGE=javascript>
<!--
function DisplayNone(){
ID2.style.display = "none";
ID4.style.display = "none";
}
//-->
</SCRIPT>
</head>
<body id=bdy name="bdy">
<form name="frm">
<DIV ID="ID1" STYLE="position:absolute; left:10; top:10;width:300; height:15; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">Div ID1 Here </DIV>
<DIV ID="ID2" STYLE="position:absolute; left:10; top:30;width:130; height:28; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:8pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">Div ID2 Here </DIV>
<DIV ID="ID3" STYLE="position:absolute; left:185; top:30;width:100; height:28; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:8pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">Div ID3 Here </DIV>
<DIV ID="ID4" STYLE="position:absolute; left:10; top:60;width:100; height:20; background-color:#FFFFFF;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">
<INPUT NAME="A1" TYPE="text" STYLE=" position:absolute; width:100%; height:100%; background-color:#FFFFFF font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none; text-align: Right;" VALUE="1.000" Datatype="number" mask="" Decimal="3" MAXLENGTH="4">
</DIV>
<DIV ID="ID5" STYLE="position:absolute; left:185; top:60;width:100; height:20; background-color:#FFFFFF;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">
<INPUT NAME="A2" TYPE="text" STYLE=" position:absolute; width:100%; height:100%; background-color:#FFFFFF font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none; text-align: Right;" VALUE="1.000" Datatype="number" mask="" Decimal="3" MAXLENGTH="4">
</DIV>
<DIV ID="ID1" STYLE="position:absolute; left:10; top:90;width:300; height:15; background-color:#C0C0C0;display:inline; font-family:Verdana; font-size:10pt; color:#000000; font-weight:none; font-style:none; text-decoration:none">
<INPUT NAME="B1" TYPE="button" style="width=120" value="Display" onClick="DisplayNone()">
</DIV>
</form>
</body>
</html>
****************************************************
In the above example when I click on Display button,
some piece of Div(ID2 and ID4) get disabled but I want the next piece(ID3 and ID5) should get adjusted into the place of ID2 and ID4.But since it is fixed with absolute position this not happening.I also cannot avoid absolute position since it is auto generated.
I there any way to do it.
Thanks in advance.