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 disable form controls on the form when some popup is visible using javascript??

how to disable form controls on the form when some popup is visible using javascript??

Scheduled Pinned Locked Moved ASP.NET
tutorialcsharpjavascriptasp-netquestion
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.
  • Y Offline
    Y Offline
    yogita charhate
    wrote on last edited by
    #1

    hello I the project of asp.net 2.0 . I have to disable other controls on the page when Popup is displayed on the screen.when popup is closed controls should be enabled. I hhave two display two different Popups depending on condition,so I can't use AJAX control ModulPoupExtender. How to achieve this using javascript? Please guide. thanks.

    yog hui gfgh kgdgrt njjn hjgkn

    C R 2 Replies Last reply
    0
    • Y yogita charhate

      hello I the project of asp.net 2.0 . I have to disable other controls on the page when Popup is displayed on the screen.when popup is closed controls should be enabled. I hhave two display two different Popups depending on condition,so I can't use AJAX control ModulPoupExtender. How to achieve this using javascript? Please guide. thanks.

      yog hui gfgh kgdgrt njjn hjgkn

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

      The main trick is that if they are server controls, you need to store their client side Id with something like var controlId = '<%=ServerControl.ClienID%>' Then it's just a case of var control = document.getElementByID(controlID); if (control) { control.disabled = true; }

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      1 Reply Last reply
      0
      • Y yogita charhate

        hello I the project of asp.net 2.0 . I have to disable other controls on the page when Popup is displayed on the screen.when popup is closed controls should be enabled. I hhave two display two different Popups depending on condition,so I can't use AJAX control ModulPoupExtender. How to achieve this using javascript? Please guide. thanks.

        yog hui gfgh kgdgrt njjn hjgkn

        R Offline
        R Offline
        RichardGrimmer
        wrote on last edited by
        #3

        A quick way of doing it that doesn't involve loads of enabling and disabling is to add a "veil" to the page, which is basically a transparent div (or opaque - looks kinda cool!), sized to the full screen, then when you show your popup, show the veil on z-index 99, so that it's in front of everything else (except the popup window obviously) - this then stops anything behind it recieving input.

        "Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman" (Lilly Allen / Kaiser Chiefs)

        Y 1 Reply Last reply
        0
        • R RichardGrimmer

          A quick way of doing it that doesn't involve loads of enabling and disabling is to add a "veil" to the page, which is basically a transparent div (or opaque - looks kinda cool!), sized to the full screen, then when you show your popup, show the veil on z-index 99, so that it's in front of everything else (except the popup window obviously) - this then stops anything behind it recieving input.

          "Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman" (Lilly Allen / Kaiser Chiefs)

          Y Offline
          Y Offline
          yogita charhate
          wrote on last edited by
          #4

          hi Lilly / Kaiser , Thank you for the reply but will you please tell me how to use this transperent div that is "Veil". _I'm using asp.net 2.0 is it possible in this. Please explain in a little bit detail way. thank you.

          yog hui gfgh kgdgrt njjn hjgkn

          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