> Instead of redirecting using
>
> header("Location: $url");
>
> I used <script type="text/javascript">window.location.href='url';</
> script>
>
> I would still like to know why this makes a difference if any one has
> an answer.

I think you've misunderstood what php does.
It runs at the server, you could think of it as "building" an HTML
page - which can of course contain javascript code.
None of the HTML or javascript runs at the server.
The finished package is sent down to the client browser, which reads
the HTML and renders the document, and reads the javascript and
interprets that.
Browsers have no idea what to do with any php instructions, and even
if they did, execution is taking place at the client which cannot
access any server resources.

So, if you put
   header("Location: $url");
in your php code it would get executed at the server as soon as it was
encountered, and the rest of the page would never make it to the
client.

cheers, Ross K

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to