Results 1 to 2 of 2

Thread: Ajax error

  1. #1
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax error

    Hi everyone!

    I am having trouble here, I am using this ajax script to load my php files,

    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    But I having trouble redirecting to another page.

    example of redirection I am using:
    PHP Code:
    <script type='text/javascript'window.location 'index.php' </script> 
    and
    PHP Code:
    header("Location: index.php"); 
    but it won't redirect.

    Please help me guys. Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Scripts on imported content won't fire. A PHP header redirect should. Unless of course it's syntactically incorrect for some reason.

    Which page are you trying to redirect, the imported page or the 'top' page? And why? If you want to import a certain page, just import that, don't redirect to it. If you want to redirect the top page, just do so, don't involve AJAX in it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •