SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Hybrid View
-
Aug 19, 2003, 16:02 #1
- Join Date
- Aug 2003
- Location
- uk
- Posts
- 55
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How to change browser title with framed forwarding?
Hiya, I've just bought a domain name from Easily.co.uk and am using framed forwarding (cloaking) to point that domain to some free Web space that I get with my Blueyonder broadband.
The problem is that the browser title contains the basic domain name, because that's what Easily's forwarding page contains. They won't let me change the contents of that forwarding page without buying hosting from them.
So how can I change the browser title?
Obviously, the <TITLE> tags in my site are ignored as my site's pages are contained within Easily's frame. So I thought JavaScript might help. I tried putting this in the head of my HTML page:
<script>
<!--
top.document.title='Welcome to my Web site';
//-->
</script>
Unfortunately, this doesn't change the browser's title text.
Any ideas on how I can fix this?
Thanks,
MayLast edited by may_hem1; Aug 19, 2003 at 16:39.
-
Aug 19, 2003, 17:43 #2
- Join Date
- Aug 2002
- Location
- Burpengary, Australia
- Posts
- 4,495
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
I would've thought the JS solution would work
I never use frames so I don't really know much about them, maybe you've gpt the top frames name wrong or something?
-
Aug 19, 2003, 18:39 #3
- Join Date
- Aug 2003
- Location
- uk
- Posts
- 55
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi DJP, isn't the name of the top frame irrelevant as I'm using the keyword "top"?
I've tried replacing it with "parent" but this doesn't work either.
Strange thing is that I put the following code into the head of my main 'index.html' page and it doesn't work when you view the site using the purchased domain name, but it does work when I type in the long URL for my Blueyonder Web space:
<script>
<!--
if (opener) {
alert('there is an opener');
}
else
{
alert('the title is: ' + top.document.title);
}
parent.document.title='Welcome to my Web site';
//-->
</script>
I.e. I don't get an alert at all when I type the purchased domain name into a browser, but I do get an alert when I type in the free Web space URL directly.
This is strange as all that Easily have in their forwarding Web page is a FRAME tag pointing to the free Web space URL.
Any ideas on how to fix this?
Thx,
May
-
Aug 19, 2003, 19:21 #4
- Join Date
- Jan 2003
- Location
- Calgary, Canada
- Posts
- 2,063
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
what about
Code:top.document.getElementsByTagName('title')[0].innerHTML = 'Something';
Who walks the stairs without a care
It shoots so high in the sky.
Bounce up and down just like a clown.
Everyone knows its Slinky.
Bookmarks