aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes DOM HTML --- Retriving .src? .target? 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 "DOM HTML --- Retriving .src? .target?" Watch "DOM HTML --- Retriving .src? .target?" New topic
Author

DOM HTML --- Retriving .src? .target?

Kevin Cornwell
Ranch Hand

Joined: Feb 01, 2005
Posts: 34
I have 3 frames. Frame 1 changes the main frame 2 content with a ".target" method. How do I read the NEW src/target(?) of the main frame from frame 3?

"parent.document.getElementById('main').src" returns my default value (the main frame src=splash.htm) no matter what is actually loaded in the main frame.

Thanks,
Kevin C


<a href="http://www.kevincornwell.com" target="_blank" rel="nofollow">http://www.kevincornwell.com</A>
Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429
have you tried window.parent.frames["main"].location.href or window.parent.frames["main"].document.location.href?

I don't remember whether the frame's name must be "main" in order for the to work, or if the id is enough.

-Yuriy
Kevin Cornwell
Ranch Hand

Joined: Feb 01, 2005
Posts: 34
you nailed it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DOM HTML --- Retriving .src? .target?