Hi All,
I have a problem with reloading JS.
I have a DIV where I placed JS code displaying random tricks & tips
from other site.
at the beggining I had it this way:
<div id="tips">
<script src="http://other.site.com/random_tt.php"></script>
</div>
it works without any problem, random tip is displayed.
I wanted to change tips and tricks every 5 minutes, I wrote:
setTimeout('change_tips()', 1000 * 60 * 5);
in change_tips function I have:
new_tt = document.getElementById('tips');
new_tt.innerHTML = '<script
src="http://other.site.com/random_tt.php"></script>;
but... random tips are generated this way (the output of PHP script):
tip = 'some content'
document.write(tip)
it uses document.write to display random tip
how can I reload JS with document.write?
thanks in advance
best regards
R