need to include php page asynchroneously

Discussion in 'Programming' started by stats, Jul 20, 2007.

  1. #1
    hi

    i have a page which calls an external .php page ans shows its content.

    however, the .php page takes long (up to 40 sec) to load, and because of that all my page is very slow.

    how is it possible to show a "please wait, loading ..." on the main page while it waits for the .php to load and then once the php is ready - show the php results?

    any help greately appreciated

    thanks
     
    stats, Jul 20, 2007 IP
  2. KalvinB

    KalvinB Peon

    Messages:
    2,787
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depending on what exactly that external PHP page is returning (actual code or just HTML) you could use AJAX.

    Where is this external PHP page in relation to your site and why does it take 40 seconds to load?
     
    KalvinB, Jul 20, 2007 IP
  3. stats

    stats Well-Known Member

    Messages:
    586
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    It's a search script and returns the search results .. the search itself takes long, so i want my visitors to not go away before the search completes.

    And .. my best guess is AJAX as well, but i know nothing about ajax .. could you please paste me the code in here if possible ?

    Thanks
     
    stats, Jul 20, 2007 IP
  4. mistamagoo

    mistamagoo Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0