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. Help with JAVA Scripts

Help with JAVA Scripts

Scheduled Pinned Locked Moved ASP.NET
javacsssysadmintoolsperformance
4 Posts 3 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.
  • A Offline
    A Offline
    AprNgp
    wrote on last edited by
    #1

    I have a grid view whose rows contain, a linkbutton and a textbox. The textbox is initially not visible. If any linkbutton is clicked, then the text-box in the corresponding row has to be made visible. I am able to do this with server-side event. But its introducing some delay which is very irritating to the user. If a client-side script can do this, it will boost the site performance. How this can be achieved with Java Scripts ?

    Apurv “Never trust a computer you can’t throw out a window.” (Steve Wozniak) “There are only two industries that refer to their customers as ‘users’.” (Edward Tufte)

    M 1 Reply Last reply
    0
    • A AprNgp

      I have a grid view whose rows contain, a linkbutton and a textbox. The textbox is initially not visible. If any linkbutton is clicked, then the text-box in the corresponding row has to be made visible. I am able to do this with server-side event. But its introducing some delay which is very irritating to the user. If a client-side script can do this, it will boost the site performance. How this can be achieved with Java Scripts ?

      Apurv “Never trust a computer you can’t throw out a window.” (Steve Wozniak) “There are only two industries that refer to their customers as ‘users’.” (Edward Tufte)

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      Instead of making the textbox invisible, set the CSS display to none. You can do this like TextBoxName.Style.Add("display", "none"); Call a javascript function on the OnClientClick of the linkbutton and set the display as visible of textbox here.

      Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      A 1 Reply Last reply
      0
      • M Manas Bhardwaj

        Instead of making the textbox invisible, set the CSS display to none. You can do this like TextBoxName.Style.Add("display", "none"); Call a javascript function on the OnClientClick of the linkbutton and set the display as visible of textbox here.

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        A Offline
        A Offline
        AprNgp
        wrote on last edited by
        #3

        i wrote it like this ...

        <asp:LinkButton ID="lbkReply" runat="server" Text="Reply" OnClientClick="txtReply.Style.Add('display','none')" />

        But, its not making the text box txtReply invisible .... :(

        Apurv “Never trust a computer you can’t throw out a window.” (Steve Wozniak) “There are only two industries that refer to their customers as ‘users’.” (Edward Tufte)

        C 1 Reply Last reply
        0
        • A AprNgp

          i wrote it like this ...

          <asp:LinkButton ID="lbkReply" runat="server" Text="Reply" OnClientClick="txtReply.Style.Add('display','none')" />

          But, its not making the text box txtReply invisible .... :(

          Apurv “Never trust a computer you can’t throw out a window.” (Steve Wozniak) “There are only two industries that refer to their customers as ‘users’.” (Edward Tufte)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          txtReply is the name on the server, it will have a mangled name on the client. Use txtReply.ClientID in server side code to emit the ID you need to use on the client. Even then, I thought you need to use document.getElementById("txtReply").Style.Add...

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          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