Announcement

Collapse
No announcement yet.

Left hand nav - Dhtml / Javascript error

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

    Left hand nav - Dhtml / Javascript error

    Hi

    I have implemented a new left hand nav using dhtml. I have tested it from a few computers and it works fine - but have just tested from another and it is not working.

    Basically when I mouse over the dhtml and gif button the following message appears:

    A Runtime Error has occurred. Do you wish to Debug? Line: 42 Error: Object expected.

    If you debug (and cancel) that error - the same occurs but Line: 58.

    I am struggling to understand what is wrong there I was hoping that you could:

    1) Test from your PC - www.kjbeckett.com and reply if you have a problem (so that I can begin to identify a trend).

    2) Point me in the right direction to debug. My knowledge of Javascript is baisc.

    Many thanks

    Paul
    KJ Beckett
    Men's Clothing & Accessories
    Cufflinks, Underwear, Ties, Grooming Products
    Bath, England
    Fast delivery to UK, USA and worldwide.
    Men's Fashion Blog

    #2
    Use Firefox to view the page and turn Tools / JavaScript Console on. That will give you meaningfull error messages.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Paul,

      tested the navigation under Firefox and IE and all works fine for me.

      Just to note the product pages under IE require horizontal scrolling which may be worth looking at.


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #4
        Norman

        I can't install Firefox from the computer that is presenting the issue. From my systems I can install firefox - however I am not getting the error from that system.

        I have clicked on Debug - Yes, from the computer causing the error which opens a Microsoft script editor - the line highlighted is line 43 which basically contains all the body html (including the dhtml).

        i am using a system from part of a large bluechip corp and therefore I wonder if it is anything to do with security settings?
        KJ Beckett
        Men's Clothing & Accessories
        Cufflinks, Underwear, Ties, Grooming Products
        Bath, England
        Fast delivery to UK, USA and worldwide.
        Men's Fashion Blog

        Comment


          #5
          I also get this see attachment.

          I don't use IE as my default browser because I get this error on 50% of the sites I visit. I rebuilt my PC 3 months ago so its not a degenerated install.

          I tend to think the problem is with IE.

          I'd be interested if you come up with a solution...
          Attached Files

          Comment


            #6
            On all 3 systems I checked on, as soon as I mousover By Product, By Designer or By Style I get JavaScript error MM_swapImage is not defined.

            This happens on ALL browsers IE, Firefox and Opera (which also has a reasonable JavaScript Console).

            Also I see only text against Product, By Designer or By Style - I'm guessing you may intend to show a mousover image there but nothing shows, presumably due to a missing MM_swapImage routine.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Thanks

              I will keep looking at this one. I was wondering if it had something to do with the mouseover.

              My original code - with mouse over worked - but then this did stop working - at present the mouseover image is the same as off image. I will try and get the mouseover working.

              Paul
              KJ Beckett
              Men's Clothing & Accessories
              Cufflinks, Underwear, Ties, Grooming Products
              Bath, England
              Fast delivery to UK, USA and worldwide.
              Men's Fashion Blog

              Comment


                #8
                Jo, Jont, Norman

                Many thanks for your help!!!! Do you mind checking to see if you get the error on your systems now?

                I have gone through my DHTML and have resolved the mouseover issue. Most of the images are currently identical so you wont actually see a image change - except for the test one - By Style which should change to red. This is working from my system - but of course I never got the Runtime Error.

                However in the preview page of actinic - when i mouseover I do get a javascript on old pages with the old dhtml - but not on new pages with my rewritten dhtml. Of course soon all pages will use the fixed dhtml.

                I never found out what I had done wrong - probably a typo. In the end I simply went back to my original code and started again (more carefully second time round). But it looks like the runtime error was being created by my dodgy code.

                I am not sure if we will identify why this mouseover issue hit some machines and not others but I will definately widen my testing (from diverse systems) in the future.

                Paul
                KJ Beckett
                Men's Clothing & Accessories
                Cufflinks, Underwear, Ties, Grooming Products
                Bath, England
                Fast delivery to UK, USA and worldwide.
                Men's Fashion Blog

                Comment


                  #9
                  Your home page seems to work now but as soon as I follow one of the links I get more javaScript errors. This one's easy to fix. You have
                  Code:
                  <script language="JavaScript1.2"> 
                  var bookmarkurl="http://www.kjbeckett.com";
                  var bookmarktitle="KJ Beckett - Mens Accessories";
                  function addbookmark(){
                  if (document.all)
                  window.external.AddFavorite(bookmarkurl,bookmarktitle);
                  }
                  <script language="JavaScript" type="text/JavaScript">
                  <!--
                  var menuState = -1;
                  function showSubMenu(n)
                  {
                  //collapse currently displayed submenu
                  if (menuState >= 0
                  I.e. <script language="JavaScript" type="text/JavaScript">
                  <!--
                  inside existing JavaScript. You probably need a </script> above the second <script....> tag.

                  It's really worth using Firefox or Opera with the JavaScript Console turned on as all these errors become really obvious.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Thanks Norman

                    Yes - Act_BrochurePrimary had </script> but the Act_Primary page did not.

                    Many thanks for checking this.

                    I will get firefox and/or opera today!

                    Paul
                    KJ Beckett
                    Men's Clothing & Accessories
                    Cufflinks, Underwear, Ties, Grooming Products
                    Bath, England
                    Fast delivery to UK, USA and worldwide.
                    Men's Fashion Blog

                    Comment


                      #11
                      I think I have fixed the javascript issue within the store pages but haven't had a chance to load Firefox yet. If anyone else gets a problem I would appreciate it if you could hightlight this.
                      KJ Beckett
                      Men's Clothing & Accessories
                      Cufflinks, Underwear, Ties, Grooming Products
                      Bath, England
                      Fast delivery to UK, USA and worldwide.
                      Men's Fashion Blog

                      Comment


                        #12
                        Yep the problem has gone from my dodgy IE too

                        Comment

                        Working...
                        X