I have an object that's being created on the body onload event:
<body onload="var clock = new Clock(<?php echo $user->timezone ?>); clock.start();">
when I try to reference it further on the page, lets say on this:
<div id="month" onclick="alert(clock.time());"></div>
It will give me the error of undeclared function.. am I missing something?
ps: I don't really want to instantiate the object somewhere else in the javascript file, since clock takes a couple arguments from PHP.