Author |
Message |
ThePiston
Worker


Joined: Dec 22, 2004
Posts: 135
|
Posted:
Thu Oct 20, 2005 2:09 pm |
|
I created a lot of modules strictly to insert a link such as thisCode:<?php
echo "
<SCR!PT LANGUAGE=\"JavaScript\">
top.location.replace ('topics.html?file=index&op=all')
</SCR!PT>
"
?>
|
When I use this I get a pretty long pause and an all white screen before it actually goes to the link... is there any way to stop that so that the pages transitions smoothly into the next? |
|
|
|
 |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Thu Oct 20, 2005 3:18 pm |
|
|
|
 |
ThePiston

|
Posted:
Thu Oct 20, 2005 3:44 pm |
|
thanks, but I don't think that's it... normal module links do not do this. |
|
|
|
 |
hitwalker

|
Posted:
Thu Oct 20, 2005 5:51 pm |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Oct 20, 2005 6:52 pm |
|
ThePiston wrote: | I created a lot of modules strictly to insert a link such as thisCode:<?php
echo "
<SCR!PT LANGUAGE=\"JavaScript\">
top.location.replace ('topics.html?file=index&op=all')
</SCR!PT>
"
?>
|
When I use this I get a pretty long pause and an all white screen before it actually goes to the link... is there any way to stop that so that the pages transitions smoothly into the next? |
The better and prefered way is to use the php header() command. |
|
|
|
 |
ThePiston

|
Posted:
Fri Oct 21, 2005 7:41 am |
|
Raven, do you mean like the normal header? like this?Code:include("header.php");
|
|
|
|
|
 |
hitwalker

|
Posted:
Fri Oct 21, 2005 8:00 am |
|
no but in your case it would be like..
Code:<?php
header("topics.html?file=index&op=all");
?>
|
|
|
|
|
 |
Raven

|
Posted:
Fri Oct 21, 2005 8:20 am |
|
Actually it would be
Code:header("Location: topics.html?file=index&op=all");
|
|
|
|
|
 |
ThePiston

|
Posted:
Fri Oct 21, 2005 8:24 am |
|
That actually didn't work. I tried theseCode:<?php
header("Location: Topics&file=index&op=all");
?>
| andCode:<?php
header("Location: topics.html?file=index&op=all");
?>
|
|
Last edited by ThePiston on Fri Oct 21, 2005 8:26 am; edited 1 time in total |
|
|
 |
Raven

|
Posted:
Fri Oct 21, 2005 8:26 am |
|
Unless you have GT'd that link it won't work. I was simply using your code. TryCode:<?php
header("Location: top.htmlics&file=index&op=all");
?>
|
|
|
|
|
 |
ThePiston

|
Posted:
Fri Oct 21, 2005 8:28 am |
|
All i have in this module is this index.php file, I'm getting a 404 not found error |
|
|
|
 |
ThePiston

|
Posted:
Fri Oct 21, 2005 9:27 am |
|
ok, it works a lot better if I use the entire URL like this Code:<?php
header("Location: http://www.mywebsite.com/modules.php?name=Topics&file=index&op=all");
?>
|
also, simpy putting "include("header.php");" also keeps most of the page viewable while the new URL comes up. |
|
|
|
 |
|