Announcement

Collapse
No announcement yet.

Checkout Page 0 Javascript Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Checkout Page 0 Javascript Error

    Hi,

    Does anybody have any ideas how to resolve Object expected errors on the shopping cart checkout page 0. The error details are shown below.

    I know it is to do with the section

    <actinic:variable name="CheckoutArea" value="Both Addresses Address Fields" />

    I have reverted this back to factory default but when I vew the page in Actinic it showns 3 x 'A JavaScript error has been found on the page ('Object expected') but I do not know how to locate this error. When I view the source the lines that error are:

    Line 17: InvoiceCountryChanged();
    Line 19: DeliveryCountryChanged();
    Line 21: SetDeliveryAddressVisibility();

    Any help would be appreciated.

    Thanks


    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Timestamp: Sun, 14 Nov 2010 14:15:46 UTC


    Message: Object expected
    Line: 17
    Char: 1
    Code: 0
    URI: http://www.tech-accessories.co.uk/cg...alog%2ftest%2f


    Message: Object expected
    Line: 19
    Char: 1
    Code: 0
    URI: http://www.tech-accessories.co.uk/cg...alog%2ftest%2f


    Message: Object expected
    Line: 21
    Char: 1
    Code: 0
    URI: http://www.tech-accessories.co.uk/cg...alog%2ftest%2f

    #2
    The links you've posted won't work. They're only valid if someone's on your site and adding to cart.

    We'll need a link to your actual site to help.

    At the moment www.tech-accessories.co.uk shows an "Actinic Hosting" welcome page.

    Also, you will get much better diagnostics if you view your site using Firefox and use its Tools / Error Console.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi,

      I have the site in test mode at the moment so the address is:

      http://www.tech-accessories.co.uk/acatalog/test/

      Thankss
      Tony

      Comment


        #4
        Further information

        I have had a look via Firefox as suggested and have got the following for the function SetDeliveryAddressVisibility() error.

        But I still cannot understand why the error is occuring

        Below is the code from Actinic

        NETQUOTEDEL:INVOICEPHASE

        <!-- XML tags for formatting of the address list in B2B mode -->
        <Actinic:VAR NAME=ADDRESS_COLUMNS VALUE=3/> <Actinic:VAR NAME=ADDRESS_FORM0 VALUE="
        <INPUT TYPE=HIDDEN NAME=%sADDRESSSELECT VALUE=%s>
        <B>%s</B><BR>%s,<BR>%s,<BR>%s,<BR>%s, <B>%s</B>,<BR><B>%s</B>
        "/> <Actinic:VAR NAME=ADDRESS_FORM1 VALUE="
        <U><B>%s:</B></U>
        <INPUT TYPE=RADIO NAME=%sADDRESSSELECT VALUE=%s%s><BR>
        <B>%s</B><BR>%s,<BR>%s,<BR>%s,<BR>%s, <B>%s</B>,<BR><B>%s</B>
        "/> <Actinic:VAR NAME=ADDRESS_FORM2 VALUE="
        <U><B>%s:</B></U>
        <INPUT TYPE=RADIO NAME=%sADDRESSSELECT VALUE=%s%s><BR>
        <B>%s</B><BR>%s,<BR>%s,<BR>%s,<BR>%s, <B>%s</B>,<BR><B>%s</B>
        "/> <Actinic:VAR NAME=ADDRESS_TITLE0 VALUE=""/> <Actinic:VAR NAME=ADDRESS_TITLE1 VALUE="%s:"/>
        <Actinic:VAR NAME=ADDRESS_TITLE2 VALUE="%s:"/> <Actinic:VAR NAME=ADDRESS_TITLE10 VALUE=""/>
        <Actinic:VAR NAME=ADDRESS_TITLE11 VALUE=""/> <Actinic:VAR NAME=ADDRESS_TITLE12 VALUE="
        <INPUT TYPE=RADIO id=idADDRESSSELECT_0 NAME=%sADDRESSSELECT VALUE=0 CHECKED>
        %s:
        "/> <Actinic:VAR NAME=ADDRESS_TABLE VALUE="
        %s
        <TABLE WIDTH=<actinic:variable name="ACTSTDWIDTH" /> BORDER=0 CELLSPACING=0 CELLPADDING=1 BGCOLOR=%s><TR><TD>
        <TABLE WIDTH=100%% BORDER=0 CELLSPACING=0 CELLPADDING=4 BGCOLOR=%s>
        %s
        </TABLE>
        </TD></TR></TABLE>
        %s
        "/>
        <!-- End of B2B address formatting tags -->
        <Actinic:BOTHADDRESSDETAILS>

        <input type="hidden" name="ActCheckoutPhase" value="INVOICE">
        <input type="hidden" name="ActCheckoutPhase" value="DELIVER">
        <input type="hidden" name="ActCheckoutPhase" value="PRELIM">

        <!-- idBothAddressesTable is used by javascript -->
        <!-- class InvoiceField is used by javascript -->
        <!-- class DeliverField is used by javascript -->
        <table id="idBothAddressesTable" class="checkout">
        <colgroup>
        <col class="prompt" >
        <col>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22InvoicePrompt016Visible%22%20%2f%3e">
        <col>
        </actinic:block>
        </colgroup>
        <tr class="ShowAlways">
        <th>&nbsp;</th>
        <th class="InvoiceField" id="idInvoiceHeader"><actinic:variable name="InvoiceTitle" /></th>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22InvoicePrompt016Visible%22%20%2f%3e">
        <th class="DeliverField" id="idDeliverHeader"><actinic:variable name="DeliverTitle" /></th>
        </actinic:block>
        <actinic:block if="%21%3cactinic%3avariable%20name%3d%22InvoicePrompt016Visible%22%20%2f%3e" >
        <Actinic:ONLYINB2B>
        <th class="DeliverField" id="idDeliverHeader"><actinic:variable name="DeliverTitle" /></th>
        </Actinic:ONLYINB2B>
        </actinic:block>
        </tr>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e">
        <Actinic:ACCOUNT TYPE="ROW">
        <tr class="ShowAlways">
        <td>&nbsp;</td>
        <td class="InvoiceField" id="idInvoiceAccountAddresses"><Actinic:ACCOUNTINVOICE />
        </td>
        <td class="DeliverField" id="idDeliverAccountAddresses"><Actinic:ACCOUNTDELIVER />
        </td>
        </tr>
        </Actinic:ACCOUNT>
        </actinic:block>
        <Actinic:ADDRESSES TYPE=INVOICEFORM>
        <tr id="idSeparateShipRow" <actinic:block if="%3cactinic%3avariable%20name%3d%22InvoicePrompt016Visible%22%20%2f%3e%20%3d%3d%200" >style="display: none;"</actinic:block>>
        <td >&nbsp;</td>
        <td colspan="2" id="idSeparateShipCell" class="InvoiceField" style="padding-left: 0;">
        <input type="checkbox" <Actinic:Variable Name="InvoiceSeparateCheckStatus"/> id="idSEPARATESHIP" name="SEPARATESHIP" value="YES" onclick="SetDeliveryAddressVisibility();" tabindex="NETQUOTEVAR:TABINDEXINVOICESEPARATESHIP" style="border: 0;">
        <label for="idSEPARATESHIP"><actinic:variable name="InvoicePrompt016" /></label>
        </td>
        </tr>
        <actinic:variable value="Both Addresses Salutation" name="CheckoutPrompt" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt000Visible%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Name" />
        <actinic:variable value="Both Addresses Job Title" name="CheckoutPrompt" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt002Visible%22%20%2f%3e" />
        <actinic:variable value="Both Addresses Company Name" name="CheckoutPrompt" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt003Visible%22%20%2f%3e" />
        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22ALPInvoiceLookupEnabled%22%20%2f%3e%20%3d%3d%20true%29" >
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Postal Code" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt008Visible%22%20%2f%3e"/>
        </actinic:block>
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Line 1" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt004Visible%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Line 2" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt005Visible%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Line 3" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt006Visible%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Line 4" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt007Visible%22%20%2f%3e"/>
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Country" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt009Visible%22%20%2f%3e"/>
        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22ALPInvoiceLookupEnabled%22%20%2f%3e%20%3d%3d%20false%29" >
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Postal Code" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt008Visible%22%20%2f%3e"/>
        </actinic:block>
        <actinic:variable value="Both Addresses Residential" name="CheckoutPrompt" if="%3cactinic%3avariable%20name%3d%22InfoRequiredForInvoiceResidential%22%20%2f%3e%20%7c%7c%20%3cactinic%3avariable%20name%3d%22InfoRequiredForDeliveryResidential%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Phone" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt010Visible%22%20%2f%3e"/>
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Mobile" if="%3cactinic%3avariable%20name%3d%22InvoiceMobileVisible%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Both Addresses Fax" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt011Visible%22%20%2f%3e"/>
        <actinic:variable value="Both Addresses Email" name="CheckoutPrompt" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt012Visible%22%20%2f%3e%20%7c%7c%20%3cactinic%3avariable%20name%3d%22DeliveryPrompt023Visible%22%20%2f%3e" />
        <actinic:variable value="Both Addresses User Defined" name="CheckoutPrompt" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt014Visible%22%20%2f%3e" />
        <actinic:variable name="CheckoutPrompt" value="Moving In One Month" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt013Visible%22%20%2f%3e"/>
        <actinic:variable name="CheckoutPrompt" value="Keep Details Private" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt015Visible%22%20%2f%3e"/>
        </table>
        <table class="checkout">
        <actinic:variable name="CheckoutPrompt" value="Remember Me" if="%3cactinic%3avariable%20name%3d%22InvoicePrompt017Visible%22%20%2f%3e"/>
        </Actinic:ADDRESSES>
        </table>
        </Actinic:BOTHADDRESSDETAILS>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22InvoicePrompt016Visible%22%20%2f%3e">
        <script language="javascript" type="text/javascript" >
        SetDeliveryAddressVisibility();
        </script>
        </actinic:block>
        NETQUOTEDEL:INVOICEPHASE






        Below is the Javascript from actinicextras.jsfunction SetDeliveryAddressVisibility()
        {
        if (document.getElementById("idInvoiceRule") || document.getElementById("idDeliveryRule"))
        {
        SetAccountAddressVisibility();
        return;
        }
        SetInvoiceCountries();
        var chkSeparateShip = document.getElementById("idSEPARATESHIP");
        var sDisplay = "none";
        if (chkSeparateShip.checked)
        {
        sDisplay = "";
        }
        var cellSeparateShip = document.getElementById("idSeparateShipCell");
        if (document.getElementById("idDeliverHeader"))
        {
        if (cellSeparateShip)
        {
        cellSeparateShip.colSpan = sDisplay ? 1 : 2;
        }
        }
        SetTableCellsDisplay("idBothAddressesTable", "DeliverField", sDisplay);
        var chkResidential = document.getElementById("idINVOICERESIDENTIAL");
        if (chkResidential)
        {
        chkResidential.style.display = (chkSeparateShip.checked) ? 'none' : '';
        }
        InvoiceCountryChanged();
        }

        Comment


          #5
          Your actinicextras.js file is tiny compared with the correct V10 version and thus doesn't contain the required routines. Looks like you're somehow using a copy from an old Actinic installation.

          Back it up and replace it with the one from the "Original" folder within the Actinic installation folder (C:\Program Files.....).

          You might also want to check actiniccore.js too.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thank you

            Hi Norman,

            Thank you for your help this worked.

            Tony

            Comment

            Working...
            X