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 child window

Closing child window

Scheduled Pinned Locked Moved ASP.NET
5 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.
  • S Offline
    S Offline
    Subulakshmi Karthic
    wrote on last edited by
    #1

    Hi, I have an aspx page which is having an arraylist of audio file paths. A child window is opened in which the audio is played one by one. I have a timer control to identify when an audio file completes in the child window. Once the audio file completes, I have to close the child window and return to the parent. In the timer tick event, I have to close the child window. Please tell me how I can do this. Thanks in advance Subulakshmi

    N 1 Reply Last reply
    0
    • S Subulakshmi Karthic

      Hi, I have an aspx page which is having an arraylist of audio file paths. A child window is opened in which the audio is played one by one. I have a timer control to identify when an audio file completes in the child window. Once the audio file completes, I have to close the child window and return to the parent. In the timer tick event, I have to close the child window. Please tell me how I can do this. Thanks in advance Subulakshmi

      N Offline
      N Offline
      Nishant Singh
      wrote on last edited by
      #2

      Hi Write this Code on TimeOut

                  sScript = ";";
                      sScript =  sScript + " window.close();";
                      sScript = sScript + ";";
      				Response.Write(sScript);
      
      S 1 Reply Last reply
      0
      • N Nishant Singh

        Hi Write this Code on TimeOut

                    sScript = ";";
                        sScript =  sScript + " window.close();";
                        sScript = sScript + ";";
        				Response.Write(sScript);
        
        S Offline
        S Offline
        Subulakshmi Karthic
        wrote on last edited by
        #3

        Hi, That doesn't work since it is an ajax enabled page. I have tried that option. I even tried to call a javascript function in parent window using which I could close the child window but that also did not work. Tried to raise button click event in parent window but that also failed. Thanks, Subulakshmi

        N 1 Reply Last reply
        0
        • S Subulakshmi Karthic

          Hi, That doesn't work since it is an ajax enabled page. I have tried that option. I even tried to call a javascript function in parent window using which I could close the child window but that also did not work. Tried to raise button click event in parent window but that also failed. Thanks, Subulakshmi

          N Offline
          N Offline
          Nishant Singh
          wrote on last edited by
          #4

          ClientScript.RegisterClientScriptBlock(GetType(), "close", "CloseWindow()");

          See if this could work

          S 1 Reply Last reply
          0
          • N Nishant Singh

            ClientScript.RegisterClientScriptBlock(GetType(), "close", "CloseWindow()");

            See if this could work

            S Offline
            S Offline
            Subulakshmi Karthic
            wrote on last edited by
            #5

            I have tried that also. The problem is javascript function do not get invoked since the page is ajax enabled. I am not able to find a way to make javascript work or any other workaround to close the child window. Thanks, Subulakshmi

            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