Announcement

Collapse
No announcement yet.

javascript error when cart not empty

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

    javascript error when cart not empty

    hi there, can somebody help me with a javascript error please. i get 'page done but with errors' on my 'view basket' page. the error only occurs if there are items in the shopping basket.

    the web site with the errors is at http://www.thehockeystop.co.uk

    i don't have much experience with javascript and not sure where to start. i have looked through other threads before posting but no joy.

    anybody have any ideas?

    thank you very much.

    tony.

    #2
    The issue seems to be with this script:

    Code:
    <script type="text/javascript">
    if (document.title.indexOf("Receipt") > 0){
    pName = "<A HREF="http://www.thehockeystop.co.uk/cgi-bin/ss000007.pl?PRODREF=HSLA11201&NOLOGIN=1">LA Chopper Cycle - Red</A>";
    pName = pName.replace("'", "&prime;"); pName = pName.replace('"', "&quot;");
    document.write('<input type="hidden" name="prodName_' + counter + '" value="<A HREF="http://www.thehockeystop.co.uk/cgi-bin/ss000007.pl?PRODREF=HSLA11201&NOLOGIN=1">LA Chopper Cycle - Red</A>" />');
    }
    </script>
    Specifically, the problem seems to be that the quotation marks around the HREF attribute. They're currently double quotations marks, whereas they need to be single. Have you added any scripts to the view cart page? If so, could you post it here so that we could see it before it's uploaded?

    Thanks.

    Comment


      #3
      fixed - thank you!

      great stuff, i replaced the doubles with single quotes, my error has no gone, thank you so much for your help.

      Comment

      Working...
      X