This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to access nested frames with the frame name or id ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to access nested frames with the frame name or id ?" Watch "How to access nested frames with the frame name or id ?" New topic
Author

How to access nested frames with the frame name or id ?

Rohan Kayan
Ranch Hand

Joined: Sep 17, 2004
Posts: 123
Hi,
I have one Q related to Event propagation in frame structure

1. How can we access one frame from another frame with out knowing the actual hierarchy of the frame , I just have the frame name or frame id of the frame which I want to search?




Regards,
Rohan


SCWCD 1.4, SCJP 1.4
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Normally you would just reference the parent and than the frame id
parent.getElementById("theFrameId");

Are you saying that the frame is nested in other frames?

Eric
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
HTML & XHTML, The Definitive Guide says on page #400:

The optional name attribute for the <frame> tag labels that frame for later reference by a target attribute for the anchor (<a> tag and the <form> tag. This way, you can alter the contents of a frame using a hyperlink in another frame. Otherwise, like normal browser windows, linked documents replace the contents of the source frame.

Similarly, the id attribute uniquely identifies a frame, but the browsers do not support its use for target redirection, even though they do support id's use as a hyperlink target in many other HTML and XHTML tags.


Hope it helps....


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to access nested frames with the frame name or id ?
 
Similar Threads
GWT and HTTP post requests
HTML/JavaScript Issue
Get information from JFrame
JFileChooser:file name field becomes blank
DIV positioning