Need help please with a setTimeout for a php include.

Discussion in 'JavaScript' started by Jen-, Nov 16, 2006.

  1. #1
    Hello, I know sometimes javascript and php can be used together. Anyone know how to add a javascript set timeout to this? So that this php include will re-execute after so much time? Or is there a php refresh command I can add to this code itself, not the page. Thank you very much. Jen


    <?php
    include 'file.php';
    ?>
     
    Jen-, Nov 16, 2006 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    This cannot be done like that. You can use AJAX though.
     
    nico_swd, Nov 16, 2006 IP
  3. Jen-

    Jen- Peon

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Won't the ajax keep the php from being searched by search engines?
     
    Jen-, Nov 16, 2006 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    Pretty much, yes. But that's the only way to do that, unless you want to use iFrames.
     
    nico_swd, Nov 16, 2006 IP