Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Preserve visibility of DIV

Preserve visibility of DIV

Scheduled Pinned Locked Moved ASP.NET
javascripthtmlsysadminhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chetan Ranpariya
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • C 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

      S Offline
      S Offline
      Shrikanth Saripella
      wrote on last edited by
      #2

      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; }

      Click

      This

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups