Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Does IFRAME has location attribute? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Does IFRAME has location attribute?" Watch "Does IFRAME has location attribute?" New topic
Author

Does IFRAME has location attribute?

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
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.



My blood is tested +ve for Java.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
should be parent.frames["frameName"].window.location

Eric
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Thanks Eric!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Does IFRAME has location attribute?
 
Similar Threads
Alerts and textbox losing focus
Undefined in alert dialog box
Form Validation Fully...
MIDP Canvas problem!!!
finding the value of a radio button