Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Ajax refresh

 
   Database Help (Home) -> PHP RSS
Next:  Making Check Boxes  
Author Message
christian

External


Since: Oct 01, 2008
Posts: 1



(Msg. 1) Posted: Wed Oct 01, 2008 11:25 am
Post subject: Ajax refresh
Archived from groups: alt>comp>lang>php, others (more info?)

Hello
I use a AJAX refresh on a page to test a $var state

<div>
<?
include ("include/refr.inc.php");
//ajax script for reload
require ("bd_inc.php");
//test the line state buzy or free
$st = mysql_query("SELECT linestate FROM broad WHERE num='40'");
$linest = mysql_fetch_array($st);
$linestate= $linest["linestate"];
if ($linestate=='0')
{
echo "<script language=\"JavaScript\">";
echo "window.location.replace(\"update.php\")";
echo "</script>";
}
else .........

unfortunely it work with all instructions I have tested but redirection
instructions are not working
If I just use a simple meta refresh without ajax it work
Any idea ?

 >> Stay informed about: Ajax refresh 
Back to top
Login to vote
Jerry Stuckle

External


Since: Aug 11, 2004
Posts: 3465



(Msg. 2) Posted: Wed Oct 01, 2008 11:25 am
Post subject: Re: Ajax refresh [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

christian wrote:
> Hello
> I use a AJAX refresh on a page to test a $var state
>
> <div>
> <?
> include ("include/refr.inc.php");
> //ajax script for reload
> require ("bd_inc.php");
> //test the line state buzy or free
> $st = mysql_query("SELECT linestate FROM broad WHERE num='40'");
> $linest = mysql_fetch_array($st);
> $linestate= $linest["linestate"];
> if ($linestate=='0')
> {
> echo "<script language=\"JavaScript\">";
> echo "window.location.replace(\"update.php\")";
> echo "</script>";
> }
> else .........
>
> unfortunely it work with all instructions I have tested but redirection
> instructions are not working
> If I just use a simple meta refresh without ajax it work
> Any idea ?
>
>

A better place to ask this would be comp.lang.javascript.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex.RemoveThis@attglobal.net
==================

 >> Stay informed about: Ajax refresh 
Back to top
Login to vote
Spacefish

External


Since: Oct 11, 2008
Posts: 1



(Msg. 3) Posted: Sat Oct 11, 2008 11:25 am
Post subject: Re: Ajax refresh [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

maybe redirect with http statuscode and location header?
header("Location: /newurl.php");
-------------------------------------
visit my webpage http://www.howhot.de

christian schrieb:
> Hello
> I use a AJAX refresh on a page to test a $var state
>
> <div>
> <?
> include ("include/refr.inc.php");
> //ajax script for reload
> require ("bd_inc.php");
> //test the line state buzy or free
> $st = mysql_query("SELECT linestate FROM broad WHERE num='40'");
> $linest = mysql_fetch_array($st);
> $linestate= $linest["linestate"];
> if ($linestate=='0')
> {
> echo "<script language=\"JavaScript\">";
> echo "window.location.replace(\"update.php\")";
> echo "</script>";
> }
> else .........
>
> unfortunely it work with all instructions I have tested but redirection
> instructions are not working
> If I just use a simple meta refresh without ajax it work
> Any idea ?
>
 >> Stay informed about: Ajax refresh 
Back to top
Login to vote
Michael Fesser

External


Since: Dec 17, 2007
Posts: 867



(Msg. 4) Posted: Sat Oct 11, 2008 6:27 pm
Post subject: Re: Ajax refresh [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

..oO(Spacefish)

>maybe redirect with http statuscode and location header?
>header("Location: /newurl.php");

And an _absolute_ URL, which is required for the Location header.

Micha
 >> Stay informed about: Ajax refresh 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Wanted: Java / Ajax / php script automatic refresh browser.. - Hello, I'm looking for advise or/and programmer to create a tool / script based on Internet browser ( IE , Firefox and etc ) to automatically refresh the browser ( every 5 sec or so ) and capture new postings with notification sound and maybe pop-up..

AJAX IDE and AJAX TOOL--The Release of JoyiStar AJAX WebSh.. - The JoyiStar AJAX WebShop development team is proud to announce the release of JoyiStar AJAX WebShop 3.0 Beta for Personal Edition. This release is a major improvement in the AJAX WebShop series, which includes a large number of new features and..

ajax help - i want to have a bunch of radio buttons i.e. O = radio button O cpu 1 O cpu 2 + 150 O cpu 3 + 500 when they click either or i want it to submit the form to be processed using php and AJAX, so that their total refreshes with out the page refreshing. ....

PHP & AJAX - Hi, I have a feeling this is a dumb question, but I am exploring AJAX and PHP. I would like to write my PHP in an Object Oriented approach. What is the limitation on what I can return in AJAX? Every example I find seems to be text, which make sense..

Understanding AJAX - Hi, I am writing a PHP app and am trying to utilize AJAX with this. When I use AJAX to call a PHP script, how do I tell the PHP script what I want from it? Is there another way to do this other than either having a different PHP script for every actio...
   Database Help (Home) -> PHP All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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



[ Contact us | Terms of Service/Privacy Policy ]