Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

TextBox appear depended on checkbox

$
0
0
<scriptlanguage="javascript"type="text/javascript"> 
           function forRentClicked(sender) {
 
                   var tb1 = document.getElementById('<%= TextBox4.ClientID %>');
                   tb1.style.display = sender.checked ? 'inline' : 'none';
           }
 
        </script>
_____________________________________________________________
<asp:CheckBox ID="CheckBox1" runat="server"
                                    Text=" XS" onClick="forRentClicked(this)" Checked="True" />
 
<asp:TextBoxID="TextBox4"runat="server"Height="19px"Width="80%"CssClass="123"style="display:block;"></asp:TextBox>
 
how to set the default checkbox uncheck and the javascript can function ~ i want to create 5 check box while i'm click the text box appear~ thx

Viewing all articles
Browse latest Browse all 3938

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>