I'm really stuck, help! Because our new project site had to be framed, I'm finding it difficult to get the URL of the child frame into the parent frame. This is for a "Bookmarks" feature we want to include in the site's login area, but I can't see an obvious way to do this in JavaScript, and I'm still cutting my teeth with regards to Perl.
Here's the main layout of the frameset;
frameSet
frameOne=topFrame
frameTwo=mainFrame
/frameSet
topFrame contains the "Bookmarks" button. When clicked, I would like this button to transfer the user to a bookmark manager page. In this page would be an "Add Bookmark" section, the URL of which would be populated by the last page viewed in mainFrame.
I've had a fish through JScript, but haven't found anything particularly close yet. Any pointers???
[NOTE: I'm programming in ColdFusion as the main script language for the site]
2) use this in the script:
function geturl(){
url=parent.mainFrame.location.href;
parent.mainFrame.location.href="thenameofthepage.html?"+url;
}
3) on the bookmarking page, use location.search to grab the URL:
lasturl=location.search.substring(1);
4) now the variable "lasturl" contains the URL of the last page viewed in the mainFrame ..