I think is possible whit cookies, but i don`t know how
You are correct. However, since there is countless information on javascript cookies spread throughout the internet I will just give you the basic idea of how to fix your problem. As for the specifics on how cookies work, I'd go ask everybody's good friend: google.
Now, after you have researched javascript cookies on google and found out how they work, this is going to be the basic premise to the solution:
1) When the page is loaded you initiate a getCookie function (you should be able to easily find one of these functions already coded for you on google). If the results from your getCookie function are
null that means that the person has not yet visited this page today - so you want to invoke the ad code you
stole borrowed from dynamic drive.
2) At the end of the code that displays the ad you'll want to invoke the setCookie function (again, another function you'll find on google) to signify that the user has already seen the ad.
3) Now, above you said something about 24 hours but it wasn't in a legible sentence - so I'm going to assume that you don't want the user to see the ad again for a 24 hour period, at which point they will then again see the ad. Cookies have a feature in the form of an expiration date. This allows you to specify a set amount of time that the cookie exists before it no longer becomes usable - refer to the documentation on the setCookie function to get the specifics. So, if you want the user to see the ad again after a 24 hour period, you'll need to set the expiration date exactly 1 day in the future. What this means from what I've described above is that when the getCookie function is invoked 24+ hours after the setCookie function was invoked, it will not find a valid cookie and the ad will be displayed again (at which point it set's a new cookie and the ad will not be displayed for another 24 hour period)
Hope that helps.
-kaht
Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P>
<.</B>[/small]