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. Problem with iframe

Problem with iframe

Scheduled Pinned Locked Moved ASP.NET
3 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.
  • H Offline
    H Offline
    Haim Nachum
    wrote on last edited by
    #1

    hi. i have a website that contains a div with an iframe in it. the main window have tabs(buttons) by clicking them the iframe src is changed to a page of that tab. for example the "customers" tab is changing the src of the iframe to clients.aspx that contains a table of that customers and a few buttons for insert and delete that fires an ajax action and the table is updated via javascript. the problem is when the user make actions in the iframe like deleting a customer , if he then clicks on the "back" button in the browser the iframe history is fired rather then the main window history. so if he deletes a customer and hit "back" than its like the last action is rolled back and the last record that had been deleted in js is showing up again.

    D Y 2 Replies Last reply
    0
    • H Haim Nachum

      hi. i have a website that contains a div with an iframe in it. the main window have tabs(buttons) by clicking them the iframe src is changed to a page of that tab. for example the "customers" tab is changing the src of the iframe to clients.aspx that contains a table of that customers and a few buttons for insert and delete that fires an ajax action and the table is updated via javascript. the problem is when the user make actions in the iframe like deleting a customer , if he then clicks on the "back" button in the browser the iframe history is fired rather then the main window history. so if he deletes a customer and hit "back" than its like the last action is rolled back and the last record that had been deleted in js is showing up again.

      D Offline
      D Offline
      Dev S
      wrote on last edited by
      #2

      use javascript to disable back button there.

      1 Reply Last reply
      0
      • H Haim Nachum

        hi. i have a website that contains a div with an iframe in it. the main window have tabs(buttons) by clicking them the iframe src is changed to a page of that tab. for example the "customers" tab is changing the src of the iframe to clients.aspx that contains a table of that customers and a few buttons for insert and delete that fires an ajax action and the table is updated via javascript. the problem is when the user make actions in the iframe like deleting a customer , if he then clicks on the "back" button in the browser the iframe history is fired rather then the main window history. so if he deletes a customer and hit "back" than its like the last action is rolled back and the last record that had been deleted in js is showing up again.

        Y Offline
        Y Offline
        Yusuf
        wrote on last edited by
        #3

        The back button is loading from the browser cache. You can intercept the back button and force a refresh from the server. Another thing you can do is, turn browser caching off for the pages, then on back button it will be forces to reload from the server.

        Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

        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