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. Firefox IFRAME JavaScript

Firefox IFRAME JavaScript

Scheduled Pinned Locked Moved Web Development
javascriptcomtoolshelpquestion
4 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.
  • R Offline
    R Offline
    RadioButton
    wrote on last edited by
    #1

    Hello, Can anyone tell me why this does not work in FireFox? window.parent["myiframe"].location.href = window.parent["myiframe"].location.href = 'http://www.mysite.com'; This script is being called from LinkButton in another IFRAME window. It's works prefectly in IE and I don't like that. X| Thank you for the help. RB

    P 1 Reply Last reply
    0
    • R RadioButton

      Hello, Can anyone tell me why this does not work in FireFox? window.parent["myiframe"].location.href = window.parent["myiframe"].location.href = 'http://www.mysite.com'; This script is being called from LinkButton in another IFRAME window. It's works prefectly in IE and I don't like that. X| Thank you for the help. RB

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Why not just: window.parent["myiframe"].location.href = 'http://www.mysite.com'; ??

      R 1 Reply Last reply
      0
      • P Paddy Boyd

        Why not just: window.parent["myiframe"].location.href = 'http://www.mysite.com'; ??

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

        Yes I agree that, but for IE to work that is how I had to do it for some reason. However I have tested Firefox as well with the example you provided. I was doing some reading and even tried: window.parent.frames["myiframe"].location.href = 'http://www.mysite.com'; and that did not work either. It's almost like Firefox is ignoring window.parent

        R 1 Reply Last reply
        0
        • R RadioButton

          Yes I agree that, but for IE to work that is how I had to do it for some reason. However I have tested Firefox as well with the example you provided. I was doing some reading and even tried: window.parent.frames["myiframe"].location.href = 'http://www.mysite.com'; and that did not work either. It's almost like Firefox is ignoring window.parent

          R Offline
          R Offline
          RadioButton
          wrote on last edited by
          #4

          Just in case anyone else runs into this problem. Just use: window.parent.document.getElementById('myiframe').src = 'http://www.mysite.com' Worked perfect. RB

          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