Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342

    Can It Be Done!?

    Is there a way in php where I can refresh an include, without refreshing the whole page?

    I have an include file, lets say viewbanenr.php.

    The user buts the banner inside his page, i want a way which I can refresh the banner without refreshing the page.

    I was thinking of doing it inside a loop, but maybe someone knows a faster way?

  2. #2
    Join Date
    Nov 2001
    Posts
    551
    This is more a function of the browser than php.

    two ways I can think of:
    1. Iframe banner, and just use the meta refresh statement.
    2. Flash banner, pull new banner.

    I would go with the iframe banner, it wouldn't work with old browsers, but it wouldn't be as nasty.

    in each case viewbanner.php would be called in the html/action script and not in php.

  3. #3
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342
    but i do not have control over the user's php page, only my include page?

  4. #4
    Join Date
    Nov 2001
    Posts
    551
    you will have to instruct the users to change their page, otherwise I don't believe it can be done.

    if they are calling viewbanner.php like
    Code:
    <img src="http://www.yoursite.com/viewbanner.php">
    you will have to tell them to change it to something like:
    Code:
    <IFRAME SRC="http://www.yoursite.com/viewbanner.php" width=460 height=40>
    <!-- Alternate content for non-supporting browsers -->
    </IFRAME>

  5. #5
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342
    Originally posted by ambirex
    you will have to instruct the users to change their page, otherwise I don't believe it can be done.

    if they are calling viewbanner.php like
    Code:
    <img src="http://www.yoursite.com/viewbanner.php">
    you will have to tell them to change it to something like:
    Code:
    <IFRAME SRC="http://www.yoursite.com/viewbanner.php" width=460 height=40>
    <!-- Alternate content for non-supporting browsers -->
    </IFRAME>
    Great.. I understood that..

    All I have to do in viewbanner.php now is to refresh whenver i want to and the page will not get affected (the main page).

    Including it as a frame, will it affect the way the banner is implemented (will it show)--never dealt with banners before!

Posting Permissions

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