|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Div tag to display/ hide a control ....please helpi need small code snippet for implementaion of div tag. Let say, if i click a button, i have to hide a checkbox list. I have placed that control inside the Div tag, but not responding. Mahes. ----------------------in codebehind -------------- Button1.Attributes.Add("onclick", "mycall()") ------------------------in aspx. page- ------------- <script language="javascript"> function mycall() { alert("responding"); var fr=document.Form1; fr.green.style.display="none"; alert("yes disabled"); } </script> ------------ <!-- <DIV id="green" style="DISPLAY: block"> <asp:checkboxlist id="CheckBoxList2" runat="server" Width="173px" Height="41px" BackColor="Lime"> <asp:ListItem Value="a">a</asp:ListItem> <asp:ListItem Value="b">b</asp:ListItem> </asp:checkboxlist> </DIV> <asp:button id="Button1" runat="server" Text="Button" Width="121px" style="Z-INDEX: 101; LEFT: 147px; POSITION: absolute; TOP: 228px"> </asp:button> --> Hi,
if you use server control it will post back.. please find the code below... <script language="javascript"> function show() { document.getElementById ('hideShow').style.visibility = 'visible' } function hide() { document.getElementById ('hideShow').style.visibility = 'hidden' } </script> <form id="Form1" method="post" runat="server"> <DIV id="hideShow"> <asp:checkboxlist id="CheckBoxList2" runat="server" Width="173px" Height="41px" BackColor="Lime"> <asp:ListItem Value="a">a</asp:ListItem> <asp:ListItem Value="b">b</asp:ListItem> </asp:checkboxlist> </DIV> </form> <input type=button value="show" Width="121px" onclick="show()" > <input type=button value="hide" Width="121px" onclick="hide()" > Regards, nandha. >-----Original Message----- Let say, if i click> >Hello groups, >i need small code snippet for implementaion of div tag. >a button, i have to hide a checkbox list. I have placed that control insideShow quoteHide quote >the Div tag, but not responding. TOP: 228px">> >Mahes. > > > > >----------------------in codebehind -------------- >Button1.Attributes.Add("onclick", "mycall()") > >------------------------in aspx. page- ------------- > ><script language="javascript"> > function mycall() > { > alert("responding"); > var fr=document.Form1; > fr.green.style.display="none"; > alert("yes disabled"); > } > </script> >------------ ><!-- > <DIV id="green" style="DISPLAY: block"> > <asp:checkboxlist id="CheckBoxList2" runat="server" Width="173px" >Height="41px" BackColor="Lime"> > <asp:ListItem Value="a">a</asp:ListItem> > <asp:ListItem Value="b">b</asp:ListItem> > </asp:checkboxlist> > </DIV> > <asp:button id="Button1" runat="server" Text="Button" Width="121px" >style="Z-INDEX: 101; LEFT: 147px; POSITION: absolute; Show quoteHide quote > </asp:button> > --> > > >. > Thnkz, i got somewhere the same code by google.
Maheshkr~ Show quoteHide quote "nandha" <anonym***@discussions.microsoft.com> wrote in message news:262801c53470$ac0b2440$a401280a@phx.gbl... > Hi, > if you use server control it will post back.. > please find the code below... > > <script language="javascript"> > function show() > { > document.getElementById > ('hideShow').style.visibility = 'visible' > } > function hide() > { > document.getElementById > ('hideShow').style.visibility = 'hidden' > } > > </script> > > > <form id="Form1" method="post" runat="server"> > <DIV id="hideShow"> > <asp:checkboxlist > id="CheckBoxList2" runat="server" Width="173px" > Height="41px" BackColor="Lime"> > <asp:ListItem > Value="a">a</asp:ListItem> > <asp:ListItem > Value="b">b</asp:ListItem> > </asp:checkboxlist> > </DIV> > > </form> > <input type=button value="show" > Width="121px" onclick="show()" > > <input type=button value="hide" > Width="121px" onclick="hide()" > > > Regards, > nandha. > >-----Original Message----- > > > >Hello groups, > >i need small code snippet for implementaion of div tag. > Let say, if i click > >a button, i have to hide a checkbox list. I have placed > that control inside > >the Div tag, but not responding. > > > >Mahes. > > > > > > > > > >----------------------in codebehind -------------- > >Button1.Attributes.Add("onclick", "mycall()") > > > >------------------------in aspx. page- ------------- > > > ><script language="javascript"> > > function mycall() > > { > > alert("responding"); > > var fr=document.Form1; > > fr.green.style.display="none"; > > alert("yes disabled"); > > } > > </script> > >------------ > ><!-- > > <DIV id="green" style="DISPLAY: block"> > > <asp:checkboxlist id="CheckBoxList2" runat="server" > Width="173px" > >Height="41px" BackColor="Lime"> > > <asp:ListItem Value="a">a</asp:ListItem> > > <asp:ListItem Value="b">b</asp:ListItem> > > </asp:checkboxlist> > > </DIV> > > <asp:button id="Button1" runat="server" Text="Button" > Width="121px" > >style="Z-INDEX: 101; LEFT: 147px; POSITION: absolute; > TOP: 228px"> > > </asp:button> > > --> > > > > > >. > >
Checkbox in a datagrid always returns false
hosting app from pc Highlight the datalist row Chart position RadioBNuttonList Problem query database, create control, display on page Compatibility problem of IEWebConrols Trouble Filling DropDownList in Datagrid Validation on controls within a repeater Setting dropdownlist.selectedindex when entire datagrid is dynamic |
|||||||||||||||||||||||