Did you open the script with "<"?
I found the Ebook with your example in it, on page 52.
Even though I write ASP, it is pretty much is same syntax. Based on what you have posted, he only thing missing is your first "<".
If not, then please post more, and we will take a look!