HTTP 500 means a server internal error. It's caused by a server side problem. I think you should check server log to see if there is any exception.
please refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500?retiredLocale=id
BTW, the correct way to put script in <head> is to use https://www.zkoss.org/wiki/ZUML%20Reference/ZUML/Processing%20Instructions/script