J
John Seeliger
I tried asking this in comp.lang.javascript, but didn't really get the
answer I am looking for. They wanted me to do it a different way with a
meta refresh, which I might end up doing but anyone here know if this would
work.
I have several domains including johntexas.com. I have four of them
redirected to johnstexas.com, which is hosted. The redirections put them in
a frame and I found the code to pop them out, but I want to put a message
into the code only when a redirection occurs.
I used:
<script language = javascript type = "text/javascript">
<!-- hide from older browsers
if (top.location != self.location) {
document.write('You have entered johntexas.com, jonstexas.com, jontexas.com
or johnseeliger.name and been redirected to johnstexas.com. This is not an
error.');
top.location = self.location;
}
Now when you click on www.johntexas.com , you get redirected to
www.johnstexas.com , but it doesn't print my message. Am I doing it wrong?
Thanks,
-John
answer I am looking for. They wanted me to do it a different way with a
meta refresh, which I might end up doing but anyone here know if this would
work.
I have several domains including johntexas.com. I have four of them
redirected to johnstexas.com, which is hosted. The redirections put them in
a frame and I found the code to pop them out, but I want to put a message
into the code only when a redirection occurs.
I used:
<script language = javascript type = "text/javascript">
<!-- hide from older browsers
if (top.location != self.location) {
document.write('You have entered johntexas.com, jonstexas.com, jontexas.com
or johnseeliger.name and been redirected to johnstexas.com. This is not an
error.');
top.location = self.location;
}
Now when you click on www.johntexas.com , you get redirected to
www.johnstexas.com , but it doesn't print my message. Am I doing it wrong?
Thanks,
-John