Looks like you already have some fancy stuff going on. Anyways, the name of the parent, mmm.
I think you actually mean the filename of the parent. These sorts of things must be done all on one domain. Given that (which it appears you have):
contains the entire address of the parent page. If you need to parse that, and don't know how, let me know.
Also useful might be:
That's for when there may be several levels of frames and/or iframes. It will report the top level. Parent only goes up one level from the current page.
Both will report the current page if there is no containing frame.
To get an idea of what is being returned, paste this into the address bar and hit enter:
Code:
javascript:alert(parent.location.href)
and then try:
Code:
javascript:alert(parent.location.href.replace(/.*\//,''))
if that gets you what you are looking for, use:
Code:
parent.location.href.replace(/.*\//,'')
as the basis for comparison.
Bookmarks