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. How to call a javascript function in content place holder when the content place holder refreshes?

How to call a javascript function in content place holder when the content place holder refreshes?

Scheduled Pinned Locked Moved ASP.NET
helpjavascriptcsstutorialquestion
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.
  • V Offline
    V Offline
    Varun Sareen
    wrote on last edited by
    #1

    I have a content place holder in which there is a print button which creates a notepad file on the click of it for the records which are selected (checkboxes) in the grid view. The print button is placed in a

    tag and the tag is hidden by default on the load of content place holder. A javascript code is called on the onclick event of the checkbox in the grid which makes the

    for print button visible (if any of the checkbox is checked) and hide it when all the checkboxes are unchecked. The problem I am facing is that when I click on the print button then some events occurs and the content place holder refreshes and hence the

    tag for the print button gets hidden although the checkboxes already checked remains checked only. Now what i have done is: I have made the

    tag visible true always and looking to write a javascript code for making the

    tag invisible while the grid is not filled. But I am wondering that where should i call this particular javasscript code? If someone could help me out? Thanks Varun Sareen

    N 1 Reply Last reply
    0
    • V Varun Sareen

      I have a content place holder in which there is a print button which creates a notepad file on the click of it for the records which are selected (checkboxes) in the grid view. The print button is placed in a

      tag and the tag is hidden by default on the load of content place holder. A javascript code is called on the onclick event of the checkbox in the grid which makes the

      for print button visible (if any of the checkbox is checked) and hide it when all the checkboxes are unchecked. The problem I am facing is that when I click on the print button then some events occurs and the content place holder refreshes and hence the

      tag for the print button gets hidden although the checkboxes already checked remains checked only. Now what i have done is: I have made the

      tag visible true always and looking to write a javascript code for making the

      tag invisible while the grid is not filled. But I am wondering that where should i call this particular javasscript code? If someone could help me out? Thanks Varun Sareen

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You would obviously want to call the javascript on the checkbox click events. You of course need logic to validate each checkbox's status and show/hide the button appropriately. I would recommand looking at JQuery[^]


      I know the language. I've read a book. - _Madmatt

      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