Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does IFRAME has location attribute?

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have following statement in my existing code.
window.frames[myframe.name].location.href = "about:blank";

I searched on Google and did not find any thing like frame.location. Although above code does not give any error. But when I tried with alert(myframe.location) and alert(myframe.location.href), I faced errors.


 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
should be parent.frames["frameName"].window.location

Eric
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic