like doorknob said there is no way to do that...but by visiting the site once a day you could check inside the function if you image exists.
if not post the image to your dropbox.
now... problems... you need prolly a userid and password to post something to your dropbox account.
you cannot store passwords inside your javascript because everyone can read that.
to execute the code (update the image) you need to visit the page.
you need some sort of serverwhere you wanna store this html/javascript.
anyway here is a working function function that updates the image if you can host this code somewhere.
function update(){
var now=new Date(),
day=now.getDate(),
month=now.getMonth()+1,
year=now.getFullYear()%100,
dayofweek=now.getDay()==0?'s':'d',
url='http://thedilbertstore.com/images/periodic_content/dilbert/dt',
img=document.getElementsByTagName('img')[0];
day=day<10?'0'+day:day;
month=month<10?'0'+month:month;
img.src=url+year+month+day+dayofweek+'hct.jpg';
}
window.onload=update;
you could search for a free php hosting site wich has also cron jobs wich execute periodically.
how this works:
find a php host that has cron jobs..
create a php script that is similar to this javascript update function.
inside the function check if this image(same named) exists on you dropbox.
then you need to create a credentials script to login to dropbox and you can send the image if it does not exist.
now in the host's admin panel you need to link the php scrip to the periodical cron job.
and it should work.