Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
ThePiston
Worker
Worker



Joined: Dec 22, 2004
Posts: 135

PostPosted: Thu Oct 20, 2005 2:09 pm Reply with quote

I created a lot of modules strictly to insert a link such as this
Code:
<?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?
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Thu Oct 20, 2005 3:18 pm Reply with quote

This could be a solution.. [ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message
ThePiston







PostPosted: Thu Oct 20, 2005 3:44 pm Reply with quote

thanks, but I don't think that's it... normal module links do not do this.
 
hitwalker







PostPosted: Thu Oct 20, 2005 5:51 pm Reply with quote

Have you tried ?
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Oct 20, 2005 6:52 pm Reply with quote

ThePiston wrote:
I created a lot of modules strictly to insert a link such as this
Code:
<?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.
 
View user's profile Send private message
ThePiston







PostPosted: Fri Oct 21, 2005 7:41 am Reply with quote

Raven, do you mean like the normal header? like this?
Code:
include("header.php");
 
hitwalker







PostPosted: Fri Oct 21, 2005 8:00 am Reply with quote

no but in your case it would be like..
Code:
<?php

header("topics.html?file=index&op=all");
?>
 
Raven







PostPosted: Fri Oct 21, 2005 8:20 am Reply with quote

Actually it would be
Code:
header("Location:  topics.html?file=index&op=all");
 
ThePiston







PostPosted: Fri Oct 21, 2005 8:24 am Reply with quote

That actually didn't work. I tried these
Code:
<?php 

header("Location:  Topics&file=index&op=all");
?>
and
Code:
<?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







PostPosted: Fri Oct 21, 2005 8:26 am Reply with quote

Unless you have GT'd that link it won't work. I was simply using your code. Try
Code:
<?php

header("Location:  top.htmlics&file=index&op=all");
?>
 
ThePiston







PostPosted: Fri Oct 21, 2005 8:28 am Reply with quote

All i have in this module is this index.php file, I'm getting a 404 not found error
 
ThePiston







PostPosted: Fri Oct 21, 2005 9:27 am Reply with quote

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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©