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. Prevent Closing of IFRAME

Prevent Closing of IFRAME

Scheduled Pinned Locked Moved ASP.NET
helptutorial
3 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.
  • M Offline
    M Offline
    M J Jaya Chitra
    wrote on last edited by
    #1

    Dear All, In my web application, I have a IFRAME in a web page. When the user previews a document it is loaded in the IFRAME. When the user places the cusrsor outside the IFRAME in the page and presses "ESC" key, it closes the IFRAME. Can any one tell me how to get rid of this issue. Thanks a lot in advance

    Best Regards, M. J. Jaya Chitra

    A 1 Reply Last reply
    0
    • M M J Jaya Chitra

      Dear All, In my web application, I have a IFRAME in a web page. When the user previews a document it is loaded in the IFRAME. When the user places the cusrsor outside the IFRAME in the page and presses "ESC" key, it closes the IFRAME. Can any one tell me how to get rid of this issue. Thanks a lot in advance

      Best Regards, M. J. Jaya Chitra

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      M. J. Jaya Chitra wrote:

      When the user places the cusrsor outside the IFRAME in the page and presses "ESC" key, it closes the IFRAME.

      You are using any div for place the IFrame? Can you please show us the code?

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

      M 1 Reply Last reply
      0
      • A Abhijit Jana

        M. J. Jaya Chitra wrote:

        When the user places the cusrsor outside the IFRAME in the page and presses "ESC" key, it closes the IFRAME.

        You are using any div for place the IFrame? Can you please show us the code?

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

        M Offline
        M Offline
        M J Jaya Chitra
        wrote on last edited by
        #3

        Dear Jana, Yes it is inside the div tag only below is the code for the same:

        <div id="divPDF" runat="server" visible="false">
        <iframe id="PDFframe" runat="server" style="height: 410px; width: 100%; overflow: auto;"
        frameborder="0" scrolling="auto"></iframe>
        </div>

        The code behind is:

                    divFilter.Visible = false;
                    divPDF.Visible = true;
                    lnkBackToFilters.Visible = true;
                    PDFframe.Attributes\["src"\] = "ReportPDF.aspx";
        

        Best Regards, M. J. Jaya Chitra

        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