as for the javascript, i believe you are talking about an rarw template or looking at the default hfs template that uses macros, and i belive you think it is java script....
yes, you can run hfs under ubuntu, but it can be hard to setup trafic going with the interfaces.
also, since hfs was designed as an executable, some feature will not work properly or not at all.
I have used hfs with ubuntu, but being ubuntu and have man pages, i would recommend using "LAMP"
http://www.howtoforge.com/ubuntu_lamp_for_newbies