fixing up the new category button

Filling in some of hte javascript necessary to create the new entry and
display it properly.