I have a Script Block Control in a portlet that contains Java Script code. This Java Script code is supposed to be a clock but I can only get it to display a static time. If I wrap the code in a JavaScript function called startTime() where do I put the call to startTime() so that that function is called at load time?
I figured it out.
I put
Event.observe(window, ‘load’, startTime());
at the end of the Value property for the Script Block Control.
If there is a better of of doing this please let me know.