Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Div problem...

Status
Not open for further replies.

pascalxricher

Programmer
Oct 22, 2001
14
CA
Hi,

When I try the code below, if I do this sequence...
- click on the radio button "date"
- click on the radio button "From to date"
- click on the radio button "Date time"

The two input:type="text" don't disappear with the rest of the elements in the div section... why ?!

-----------------------------------

<html>
<body>
<table>
<tr>
<td>
<input type="radio"
name="balanceValueDateChoice"
onclick="document.all.balanceValueDateLayer.style.visibility='visible';
document.all.balanceValueDateTimeLayer.style.visibility='hidden';">
Date
</td>
<td>
<div id="balanceValueDateLayer" style="visibility:hidden;">
<input type="radio"
value="FROM_DATE"
name="balanceValueDateTypeChoice"
onclick="document.all.balanceValueDate1Layer.style.visibility='visible';
document.all.balanceValueDate2Layer.style.visibility='hidden';">
From date
<br>
<input type="radio"
value="FROM_TO_DATE"
name="balanceValueDateTypeChoice"
onclick="document.all.balanceValueDate1Layer.style.visibility='visible';
document.all.balanceValueDate2Layer.style.visibility='visible';">
From to date
<br>
<table border="1">
<tr>
<td>
<div id="balanceValueDate1Layer">
<input type="text" name="balanceValueDate1" value="" size="25">
</div>
</td>
<td>
<div id="balanceValueDate2Layer">
<input type="text" name="balanceValueDate2" value="" size="25">
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
<input type="radio"
name="balanceValueDateChoice"
onclick="document.all.balanceValueDateLayer.style.visibility='hidden';
document.all.balanceValueDateTimeLayer.style.visibility='visible';">
Date time
</td>
<td>
<div id="balanceValueDateTimeLayer" style="visibility:hidden;">
TODO
</div>
</td>
</tr>
</table>
</body>
</html>

Thanks !
 
<html>
<body>
<table border="1px">
<tr>
<td>
<input type="radio"
name="balanceValueDateChoice"
onclick="document.all.balanceValueDateLayer.style.visibility='visible';
document.all.balanceValueDateTimeLayer.style.visibility='hidden';">
Date
</td>
<td>
<div id="balanceValueDateLayer" style="visibility:hidden;">
<input type="radio"
value="FROM_DATE"
name="balanceValueDateTypeChoice"
onclick="document.all.balanceValueDate1Layer.style.visibility='visible';
document.all.balanceValueDate2Layer.style.visibility='hidden';">
From date
<br>
<input type="radio"
value="FROM_TO_DATE"
name="balanceValueDateTypeChoice"
onclick="document.all.balanceValueDate1Layer.style.visibility='visible';
document.all.balanceValueDate2Layer.style.visibility='visible';">
From to date
<br>
<table border="1">
<tr>
<td>
<div id="balanceValueDate1Layer">
<input type="text" name="balanceValueDate1" value="" size="25">
</div>
</td>
<td>
<div id="balanceValueDate2Layer">
<input type="text" name="balanceValueDate2" value="" size="25">


</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
<input type="radio"
name="balanceValueDateChoice"
onclick="document.all.balanceValueDateLayer.style.visibility='hidden';
document.all.balanceValueDate1Layer.style.visibility='hidden';
document.all.balanceValueDate2.visibility='hidden';

document.all.balanceValueDateTimeLayer.style.visibility='visible';">
Date time
</td>
<td>
<div id="balanceValueDateTimeLayer" style="visibility:hidden;">
TODO
</div>
</td>
</tr>
</table>
</body>
</html>


Clive
 
Maybe it's a browser issue... Even with your example, i'm getting the error...

- Click Date
- Click From date
- Click Date time

The text field to the right, in the "date" section, doesn't disappear.
 
It's not a browser issue... I have the problem with
- IE
- Firefox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top