Announcement

Collapse
No announcement yet.

Javascript Errors

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

    Javascript Errors

    Hi Everyone...

    I wondered if anyone could help with some errors I am experiencing on my Actinic website.

    It was brought to my attention by a customer on Monday evening that there are errors on my product pages that are preventing customers adding items into the shopping bag.

    When a customer lands on a product page on the Lembrassa site there is a pink/purple matrix table that allows them to select a size to add to the shopping bag (http://www.lembrassa.com/acatalog/Fr..._Midnight.html). When the customer clicks on the required size an “add to shopping bag” box appears with style name, size etc and an “add to bag” button. Unfortunately this box is not appearing and therefore the customer cannot add items into the shopping bag.

    The “add to shopping bag” box is only used for items in the matrix table not for the matching accessories. We have therefore tested we can add these to the shopping bag and checkout without any issues. There are no errors in the shopping bag page or with checkout but rather with adding bras to the shopping bag.

    We noticed that down the bottom left of the screen it was stating the product pages have errors. Upon clicking this we were shown an error box which detailed two JavaScripts files – TH.js and Actiniccore.js. Neither JavaScripts has been changed in over a week.

    We have tried importing snapshots from the past few weeks and re-creating the site but does not make any difference - the same errors occur.

    I have spent over 50 hrs working on this and have been unable to resolve these errors. Any help/advice anyone can provide would be greatly appreciated as we have lost several days worth of trading already.

    Thank you in advance

    Laura
    http://www.lembrassa.com
    Designs for the Fuller Bust

    #2
    the problem may be the javascript thArr
    Error: syntax error
    Source file: http://www.lembrassa.com/acatalog/Th.js
    Line: 1, Column: 39
    Source code:
    [2981].sEncAnc = "";thArr[2981].nMax = ;thArr[2982].sEncAnc = "";thArr[2982].nMax = ;thArr[2983].sEncAnc = "a5086";thArr[2983].nMax = 1;thArr[2984].sEncAnc = "a5086";thArr[2984].nMax = 1;thArr[2985].sEncAnc = "a5086";thArr[2985].nMax = 1;thArr[3057].sEncA
    if you fix that one, you may get errors on numbers 2981,2982,3489 & 3490

    to find WHERE the problem is, didn't take long.
    because you have the code in one long string, I cut and pasted it into the utility call http://jsbeautifier.org/ (that puts each entry on a seperate line.
    from there, cut and paste the contents into another utility http://jslint.com/

    when the second (and more important one) runs, you get the following,
    Problem at line 885 character 20: Expected an identifier and instead saw ';'.

    thArr[2981].nMax = ;

    Problem at line 885 character 20: Stopping. (34% scanned).
    job done (well at least the easy part of identifying where your problem is)

    take a look at how you generate the Th.js

    kevin

    Comment


      #3
      as a side note, your "prototype.js" is littered with a number of js errors, nearly all of them relating to the use of the "=" sign when testing for an IF condition.
      example
      Warning: test for equality (==) mistyped as assignment (=)?
      Source file: http://www.lembrassa.com/acatalog/prototype.js
      Line: 1678, Column: 38
      Source code:
      while (element = element[property])
      this should be == (ie two equal signs)

      the risk, of course, is that the test would fail, and that bit of code would not be executed.
      I would look for a newer version of "prototype.js"

      again, put that through jsLint, and what the number of errors that come up.

      kev

      Comment


        #4
        Actiniccore.js Access Denied

        Thank you Kevin for the advice on the TH.js script. We found four errors and amended these at the server. This has solved the errors on the site using the Chrome web browser; however errors in Actiniccore.js are still appearing in Firefox and Internet Explorer thus not allowing the “add to bag” box to display and customers to shop.

        The TH.js error has disappeared in all web browsers, however the actiniccore.js access denied error is showing in Firefox and Internet Explorer.

        I wondered if you or anybody else knows how we can fix this error in order to get the Lembrassa site fully functioning in all web browsers.

        Thanks in advance for your help with this issue

        Laura
        http://www.lembrassa.com
        Designs for the Fuller Bust

        Comment


          #5
          Glad to see you've solved the initial errors but sorry to see you still have probs with the next issue,.

          I'm guessin that you running an <iframe> somewhere, and within that iframe, you are unknowingly calling back to actinic.js
          problem is, the javascript must be in the same domain.

          take a look at http://www.leftontheweb.com/message/...dtogetproperty

          looking at the code, you have a "chat" function in an iframe, and you need to tell the system to allow access to actinic.js from your page, but ignore the one from the iframe

          take a look at http://stackoverflow.com/questions/5...property-alert and I think this may? be a solution.

          regards

          kev

          Comment


            #6
            Unclear

            Hi Kevin,

            Thank you again for your advice and help.

            I am unclear from your post of you think you solution you mentioned will fix the errors we are experiencing on the site? If so would you be able to provide me with further detail/instructions on how to achieve this fix.

            Think I may need an idiot- proof instruction guide to Actinic as I am unsure exactly what you are recommending to change.

            Thank you in advance and apologies for being so clueless

            Laura
            http://www.lembrassa.com
            Designs for the Fuller Bust

            Comment

            Working...
            X