Re: [PHP] php/ajax question



At 12:55 PM -0800 12/30/06, Paul Novitski wrote:
At 12/30/2006 10:56 AM, tedd wrote:
Why can't the php script redirect the browser when called via ajax ?


Ajax is giving PHP control over just that byte-stream that ajax is receiving and perhaps inserting into the page, not the full page itself.

Say you use javascript to set the src of an img to a PHP script. When the request is made, PHP redirects to another resource. This will affect only the image object in question, not the HTML page in which the image exists.

Regards,
Paul


Pul:

I'm not sure why, but this is making sense. :-)

I suspected something like that was going on in the background.

Thanks,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
.



Relevant Pages

  • Re: Can you do this with PHP?
    ... Basically the AJAX routine calls a PHP script. ...
    (comp.lang.php)
  • Re: Can you do this with PHP?
    ... Basically the AJAX routine calls a PHP script. ...
    (comp.lang.php)
  • Re: How do we get there from here?
    ... > 'AJAX approach'? ... I am using php and ajax, ... linked to the page back to the server, which could be a php script. ... but is not an entire page) to the JavaScript. ...
    (comp.databases.pick)
  • Re: [PHP] AJAX and PHP
    ... Click a language flag sends a request to the server. ... - how the ajax will reload this PHP page in the parent ... JSON object from PHP to javascript. ...
    (php.general)
  • Re: Can you do this with PHP?
    ... Basically the AJAX routine calls a PHP script. ...
    (comp.lang.php)