Forum Moderators: open
like index.html has 2 frames... 1.html and 2.html...
is there any way to make 1.html change the title?
i ask this because i signed up for a domain.. and it forwards to my site.. and it keeps it in a hidden frome so address doesn't change... but i don't have any way to change the title
parent.document.title='My title';
However, there's a catch: it will only work if the document comes from the same domain as the script.
You have a frameset which comes from (say) www.mydomain.com. Within that frameset is a frame with a document that comes from (say) members.somefreehost.com.
The script, then, comes from somefreehost.com -- but the title on the frameset (which is what you are trying to change) comes from a different server. That means you cannot even read the title property, let alone change it.
So the answer to your question is: theoretically, yes; but in practice, no.
top.document.title = 'New Title' But if the originating frameset comes from a different domain than your script then it is likely that this is not going to work because of javascript's "same-origin" security policy. Worth a try, though.
<added>
Yeah, what rewboss said. ;) Hey, I'm "preferred" now.
</added>
ok thanks for all your help!