Just figured it out. The "If" should be lowercase.
> Got the following error message
> ==
> Expected ';'
> /bakertaylor/category.asp, line 61, column 28
> If (String(label) == "Root"){
> ---------------------------^
> ==
>
>
> what could be the problem?
> My codes is as follows:
>
> ===
> <%
>
>
> var context = getSiteContext();
> var catalogid = context.getContext("catalogid", true);
> var catalog = context.getCatalog();
> var categoryid = context.getContext("categoryid");
> var campaignid = context.getContext("campaignid", true);
>
> var category;
> if (categoryid == null) {
> var path = context.getContext("path");
> category = catalog.GetCategoryByPath(path);
> context.setPageContext("categoryid", category.categoryid);
> categoryid = category.categoryid;
> } else {
> category = catalog.GetCategory(categoryid);
> }
>
>
> var bBrowse = (context.getContext("browse") != null);
> %>
>
> <p>
>
> <%=category.description %>
>
> <%
> var label = category.description;
> If (String(label) == "Root"){
> label = "All Books";
> }
>
> %>
> ====