It might be a file not found or path issue. If you can use Firebug, it would help. If Firebug's not available, you may be able to get some information from the log files (/etc/httpd/logs/error_log and /etc/httpd/logs/access_log - paths will probably vary on your machine).
You may also want to consider using a javascript library - such as jQuery, dojo, scriptaculous, prototype or ExtJS.