Preserve visibility of DIV
-
Hi, In my page I have a textbox and a link besides it. Also one DIV is there in which I have put a usercontrol and DIV is not visible at start and I have not made it runat="server". UserControl contains one search button and a textbox. on the click on link I am making DIV visible by using javascript. when it appears users can do search by clicking on the Search button in the usercontrol. The problem is when user click on the search button to perform search the DIV disappears. I want DIV to be visible even after any server side event fires. Can any one suggest me workaround this or any new idea to implement this functionality? The following is the HTML and javascript which I have written to make the div visible. [search](javascript:showDiv();) function showDiv() { document.getElementById("divSearch").style.visibility = "visible"; } Thank you all in advance. Thanks and Regards, Chetan Ranpariya
-
Hi, In my page I have a textbox and a link besides it. Also one DIV is there in which I have put a usercontrol and DIV is not visible at start and I have not made it runat="server". UserControl contains one search button and a textbox. on the click on link I am making DIV visible by using javascript. when it appears users can do search by clicking on the Search button in the usercontrol. The problem is when user click on the search button to perform search the DIV disappears. I want DIV to be visible even after any server side event fires. Can any one suggest me workaround this or any new idea to implement this functionality? The following is the HTML and javascript which I have written to make the div visible. [search](javascript:showDiv();) function showDiv() { document.getElementById("divSearch").style.visibility = "visible"; } Thank you all in advance. Thanks and Regards, Chetan Ranpariya
Hi Chetan Ranpariya, Check this peace of code function CallMe() { var obj = document.getElementById("hndDisplayValue") if (obj.value !="") { DivShow.style.display=obj.value } else { DivShow.style.display=""; } } function ShowMe() { var StrValue ="none"; if( DivShow.style.display !="") { StrValue =""; } obj = document.getElementById("hndDisplayValue") obj.value = StrValue; DivShow.style.display = StrValue; }
This