0

I have some ad code in a smarty .tpl file that I want to refresh every 10 seconds so it will load a new ad. My ads are getting plenty of views but I want people to multilple ads in one page view instead of when the whole page is refreshed.

<div id="ads_refresh">
{if $ads->ad_top != ""}
</div>

All the code I have browsed on the web want to load an external file into a div instead of just refreshing the div with the content already in it. This is an urgent matter and would like some help ASAP. As always I appreciate the knowledge I receive. Thanks.

3
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by almostbob
0

That will not work in my case. The SMARTY template loads the ads in at run time through a database query and then the core of the application that I am not to familiar with, then keeps track of what ads to display and tracks clicks. The ad is changed everytime the page is refreshed.

I thought there was a way AJAX could refresh a single element on a page without having to actually load physical data in such as file.

0

an Ajax refesh is exactly NOT what you described
Ajax polls the server and relads the returned data file into the the same position, but it is a file transfer, there is no magic appearing data, it has to come from somewhere

Edited by almostbob: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.