I'm using Actinic V7.0.7 with a website based on the Smart theme. My client & I are aware that this issue would easily be resolved by upgrading to Actinic V8, but my client wants me to persevere using V7 first.
Task: I'm trying to modify Act_SectionLine.html so that it only displays links to sections that do not contain the HTML encoded '<' character.
Background: This website is massive, & has over 15,000 products in surprisingly few sections. If the products are simply placed in their sections, some contain literally thouasands or products, which doesn't make for quick page load times! All the products are imported from files exported from an Access database. I have therefore made the Access database split the product sections after 50 products, resulting in sections named thus: Games, Games<01>, Toys, Toys<01>, Toys<02> etc. Of these, I only want Games & Toys displayed in the list, with all the sections containing the '<' character not displayed.
Problem: I have modified the Act_SectionLine.html template (from the Smart theme).
Here's the original:
And here's my new version:
When I get Actinic do display a preview, I get a JavaScript unterminated string error. When I debug the page in the Microsoft Script Debugger, the last section's script doesn't get finished, with the following missing:
Having said that, there are actually loads of JavaScript unterminated string constant errors, either one per section displayed, or possibly one per row (of three) section links, though they could all just be complaining about the same unterminated string constant, i.e. the last one. Here's an excerpt from the code seen in the debugger:
I've been through this with Actinic support, & they say what I am trying to do should work fine. However, I suspect they may be a bug in a script somewhere, as they also say that what I have done should work. Finally, they said they don't really provide support for advanced JavaScript cusomisations, which sadly this is.
So can anyone see what is wrong with, either (i) my JavaScript shown here, or (ii) the scripts built into Actinic?
Task: I'm trying to modify Act_SectionLine.html so that it only displays links to sections that do not contain the HTML encoded '<' character.
Background: This website is massive, & has over 15,000 products in surprisingly few sections. If the products are simply placed in their sections, some contain literally thouasands or products, which doesn't make for quick page load times! All the products are imported from files exported from an Access database. I have therefore made the Access database split the product sections after 50 products, resulting in sections named thus: Games, Games<01>, Toys, Toys<01>, Toys<02> etc. Of these, I only want Games & Toys displayed in the list, with all the sections containing the '<' character not displayed.
Problem: I have modified the Act_SectionLine.html template (from the Smart theme).
Here's the original:
<!-- SectionLine HTML begin -->
<!-- Insert HTML for the beginning of a section title -->
<DIV ALIGN="LEFT">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="NETQUOTEVAR:SECTIONLINK">NETQUOTEVAR:SECTIONIMAGE</A>
</TD>
<TD ALIGN="LEFT" VALIGN="MIDDLE">
<A HREF="NETQUOTEVAR:SECTIONLINK"><B>NETQUOTEVAR:SECTIONNAME</B></A>
<br><span class="actxsmall">NETQUOTEVAR:SECTIONTEXT</span>
</TD>
</TR>
</TABLE>
</DIV>
NETQUOTEVAR:NEXT
<!-- Insert HTML for the end of a section title -->
<!-- SectionLine HTML end -->
<!-- Insert HTML for the beginning of a section title -->
<DIV ALIGN="LEFT">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="NETQUOTEVAR:SECTIONLINK">NETQUOTEVAR:SECTIONIMAGE</A>
</TD>
<TD ALIGN="LEFT" VALIGN="MIDDLE">
<A HREF="NETQUOTEVAR:SECTIONLINK"><B>NETQUOTEVAR:SECTIONNAME</B></A>
<br><span class="actxsmall">NETQUOTEVAR:SECTIONTEXT</span>
</TD>
</TR>
</TABLE>
</DIV>
NETQUOTEVAR:NEXT
<!-- Insert HTML for the end of a section title -->
<!-- SectionLine HTML end -->
And here's my new version:
<!-- SectionLine HTML begin -->
<!-- Insert HTML for the beginning of a section title -->
<Script language="javascript">
if ('NETQUOTEVAR:SECTIONNAME'.indexOf('<')<0){document.write('<DIV ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10"><TR><TD ALIGN="LEFT" VALIGN="TOP"><A HREF="NETQUOTEVAR:SECTIONLINK">NETQUOTEVAR:SECTIONIMAGE</A></TD><TD ALIGN="LEFT" VALIGN="MIDDLE"><A HREF="NETQUOTEVAR:SECTIONLINK"><B>NETQUOTEVAR:SECTIONNAME</B></A><br><span class="actxsmall">NETQUOTEVAR:SECTIONTEXT</span></TD></TR></TABLE></DIV>NETQUOTEVAR:NEXT');}
</Script>
<!-- Insert HTML for the end of a section title -->
<!-- SectionLine HTML end -->
<!-- Insert HTML for the beginning of a section title -->
<Script language="javascript">
if ('NETQUOTEVAR:SECTIONNAME'.indexOf('<')<0){document.write('<DIV ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10"><TR><TD ALIGN="LEFT" VALIGN="TOP"><A HREF="NETQUOTEVAR:SECTIONLINK">NETQUOTEVAR:SECTIONIMAGE</A></TD><TD ALIGN="LEFT" VALIGN="MIDDLE"><A HREF="NETQUOTEVAR:SECTIONLINK"><B>NETQUOTEVAR:SECTIONNAME</B></A><br><span class="actxsmall">NETQUOTEVAR:SECTIONTEXT</span></TD></TR></TABLE></DIV>NETQUOTEVAR:NEXT');}
</Script>
<!-- Insert HTML for the end of a section title -->
<!-- SectionLine HTML end -->
When I get Actinic do display a preview, I get a JavaScript unterminated string error. When I debug the page in the Microsoft Script Debugger, the last section's script doesn't get finished, with the following missing:
');}</Script>
Having said that, there are actually loads of JavaScript unterminated string constant errors, either one per section displayed, or possibly one per row (of three) section links, though they could all just be complaining about the same unterminated string constant, i.e. the last one. Here's an excerpt from the code seen in the debugger:
<Script language="javascript">
if ('GAMES'.indexOf('<')<0){document.write('<DIV ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10"><TR><TD ALIGN="LEFT" VALIGN="TOP"><A HREF="P_Online_Catalogue_GAMES.html"><IMG SRC="../Logo.jpg" ALT="Games" BORDER=0 HEIGHT=75 WIDTH=108 ALIGN="ABSMIDDLE"></A></TD><TD ALIGN="LEFT" VALIGN="MIDDLE"><A HREF="P_Online_Catalogue_GAMES.html"><B>GAMES</B></A><br><span class="actxsmall"></span></TD></TR></TABLE></DIV></TD>
<TD WIDTH="50%" valign="top">
');}
</Script> <Script language="javascript">
if ('TOYS'.indexOf('<')<0){document.write('<DIV ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10"><TR><TD ALIGN="LEFT" VALIGN="TOP"><A HREF="P_Online_Catalogue_TOYS.html"><IMG SRC="../Logo.jpg" ALT="BY GENRE" BORDER=0 HEIGHT=75 WIDTH=108 ALIGN="ABSMIDDLE"></A></TD><TD ALIGN="LEFT" VALIGN="MIDDLE"><A HREF="P_Online_Catalogue_TOYS.html"><B>TOYS</B></A><br><span class="actxsmall"></span></TD></TR></TABLE></DIV></TD>
</TR></TABLE>
<HR SIZE="1" ALIGN="CENTER" WIDTH="600"> </A> <INPUT TYPE=HIDDEN NAME="SID" VALUE="0">
<INPUT TYPE=HIDDEN NAME="PAGE" VALUE="PRODUCT">
<INPUT TYPE=HIDDEN NAME="PAGEFILENAME" VALUE="P_index.asp"> <BR><TABLE WIDTH="500" COLS="3" BORDER="0" CELLPADDING="10" CELLSPACING="0" ALIGN="CENTER"> <Actinic:SECTION BLOB="A0000.cat"/><tr><td colspan="3" valign="top"> <A NAME="a5"><table border="0" width="100%" cellspacing="5" cellpadding="1"><tr><td width="100%">
</Form>
if ('GAMES'.indexOf('<')<0){document.write('<DIV ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10"><TR><TD ALIGN="LEFT" VALIGN="TOP"><A HREF="P_Online_Catalogue_GAMES.html"><IMG SRC="../Logo.jpg" ALT="Games" BORDER=0 HEIGHT=75 WIDTH=108 ALIGN="ABSMIDDLE"></A></TD><TD ALIGN="LEFT" VALIGN="MIDDLE"><A HREF="P_Online_Catalogue_GAMES.html"><B>GAMES</B></A><br><span class="actxsmall"></span></TD></TR></TABLE></DIV></TD>
<TD WIDTH="50%" valign="top">
');}
</Script> <Script language="javascript">
if ('TOYS'.indexOf('<')<0){document.write('<DIV ALIGN="LEFT"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="10"><TR><TD ALIGN="LEFT" VALIGN="TOP"><A HREF="P_Online_Catalogue_TOYS.html"><IMG SRC="../Logo.jpg" ALT="BY GENRE" BORDER=0 HEIGHT=75 WIDTH=108 ALIGN="ABSMIDDLE"></A></TD><TD ALIGN="LEFT" VALIGN="MIDDLE"><A HREF="P_Online_Catalogue_TOYS.html"><B>TOYS</B></A><br><span class="actxsmall"></span></TD></TR></TABLE></DIV></TD>
</TR></TABLE>
<HR SIZE="1" ALIGN="CENTER" WIDTH="600"> </A> <INPUT TYPE=HIDDEN NAME="SID" VALUE="0">
<INPUT TYPE=HIDDEN NAME="PAGE" VALUE="PRODUCT">
<INPUT TYPE=HIDDEN NAME="PAGEFILENAME" VALUE="P_index.asp"> <BR><TABLE WIDTH="500" COLS="3" BORDER="0" CELLPADDING="10" CELLSPACING="0" ALIGN="CENTER"> <Actinic:SECTION BLOB="A0000.cat"/><tr><td colspan="3" valign="top"> <A NAME="a5"><table border="0" width="100%" cellspacing="5" cellpadding="1"><tr><td width="100%">
</Form>
I've been through this with Actinic support, & they say what I am trying to do should work fine. However, I suspect they may be a bug in a script somewhere, as they also say that what I have done should work. Finally, they said they don't really provide support for advanced JavaScript cusomisations, which sadly this is.
So can anyone see what is wrong with, either (i) my JavaScript shown here, or (ii) the scripts built into Actinic?
Comment