You have to use the little html button down there, at the left of the post-formatting ribbon, to get html to work. Codes will only work on the Forum if you paste them into the box that comes up.
But then, that bit of code there probably wouldn't work anyway; it's ja
va, which I'm quite sure doesn't work anywhere on the site.
I'd say you should open a support ticket about it. I can't really think of any other way to get it fixed..