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. Closing Pop Up.

Closing Pop Up.

Scheduled Pinned Locked Moved ASP.NET
help
5 Posts 4 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.
  • D Offline
    D Offline
    deepaks3
    wrote on last edited by
    #1

    Hi , I am displaying a pop-up on a click of a button in my page. I want to close the pop-up on the click of a certain button in the pop-up as well as want to refresh the parent page as the pop up closes. Plz help. Thanks a ton

    Deepak Surana

    N K 2 Replies Last reply
    0
    • D deepaks3

      Hi , I am displaying a pop-up on a click of a button in my page. I want to close the pop-up on the click of a certain button in the pop-up as well as want to refresh the parent page as the pop up closes. Plz help. Thanks a ton

      Deepak Surana

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

      Look at window.opener


      only two letters away from being an asset

      D 1 Reply Last reply
      0
      • N Not Active

        Look at window.opener


        only two letters away from being an asset

        D Offline
        D Offline
        deepaks3
        wrote on last edited by
        #3

        Thanks a lot. And one more question, how can i show a message saying something like "Saved" and then close the pop up after the user clicks on ok

        Deepak Surana

        G 1 Reply Last reply
        0
        • D deepaks3

          Hi , I am displaying a pop-up on a click of a button in my page. I want to close the pop-up on the click of a certain button in the pop-up as well as want to refresh the parent page as the pop up closes. Plz help. Thanks a ton

          Deepak Surana

          K Offline
          K Offline
          kapiljadhav
          wrote on last edited by
          #4

          Hi, you have to add a attribute to that button during the page load event of the form that would call the popup .the code for that is like: ********************************************** loginButton.Attributes.Add("onclick", "window.showModalDialog('/MyWebsite/login.aspx', null, 'status:no; dialogWidth:360px; dialogHeight:229px; help:no; scroll:no; menubar:no; resizable:no')"); *********************************************** This code is for modalDialog or for popup button.Attributes.Add ("onclick", "javascript: functiontoopenpopup();"); this will open the popup window. In the popupwindow code....on the Page_unload you have to write this code. ***************************************** window.close(); window.opener.location.reload(); ***************************************** This will close the popup and refresh the parent window. Regards, Kaps

          1 Reply Last reply
          0
          • D deepaks3

            Thanks a lot. And one more question, how can i show a message saying something like "Saved" and then close the pop up after the user clicks on ok

            Deepak Surana

            G Offline
            G Offline
            GgAben
            wrote on last edited by
            #5

            alert('saved'); window.close();

            Gg

            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