Announcement

Collapse
No announcement yet.

Script error when using Internet Explorer

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

    Script error when using Internet Explorer

    Hello,

    Users are seeing a script error when viewing my site using IE. (Obviously this is with "Disable script debugging" unchecked in the browser settings). Netscape doesn't reveal this error. Using the Windows debugger shows the cause is this:

    <table width="600" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" class="smaller">Items Ordered:<script language="JavaScript">document.write(getCartItem(3));</script>, Cart Value: <script language="JavaScript">document.write(getCartItem(1));</script></td><td align="center" class="smaller"></td><td></td></tr></table>

    Can anyone tell me what causing this? All the clues are there i.e. this is dynamically created by JavaScript.

    TIA
    Ben
    Money Saving Eco Friendly Products | UK Dating | Love Horse Dating

    #2
    I don't know if this is the problem but maybe it expects to see comment tags after <script language="JavaScript">.

    i.e. it should really say:

    <script language="JavaScript">
    <!--
    document.write(getCartItem(3));
    -->
    </script>

    I must admit though that I don't use them and I don't get any errors on my page (even with 'disable script debugging' unticked).

    Mike

    Edit: Strangely my page throws up the same error at the same place using my HTML editor and adding the comment tags makes no difference. It must be something else that's the problem.
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      Mike,

      Thanks for the suggestion. You may be right but where would I add those comments? This particular piece of code is generated dynamically by some other script. It's not part of the template, is it?

      TTFN
      Ben
      Money Saving Eco Friendly Products | UK Dating | Love Horse Dating

      Comment


        #4
        Hi Ben,

        I looked at it a bit more and decided this probably isn't the problem. (I added an edit to my earlier post rather than adding another one).

        This bit of code is in the primary template (unless you've moved it like I have).

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          That code looks OK to me. Make sure you have the lines

          <SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
          <SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>

          in Act_Primary.html as that's ( actinicextras.js ) where the getCartItem routine is.

          Norman

          PS I always look for JavaScript bugs with Mozilla as it's diagnostic tools are MUCH better than IE's.

          PPS Looking with Mozilla at http://www.redspan.com/acatalog/Onli...187.html#a1864 There are other JavaScript errors on youtr page ( SwapImage not defined ). It indeed looks like you've a heavily modified Act_Primary.html that's missing the above links.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            I found it.

            Just change <script language="JavaScript"> to <script language="text/JavaScript">

            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment

            Working...
            X