Error in JavaScript ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ak1dnar
    Recognized Expert Top Contributor
    • Jan 2007
    • 1584

    Error in JavaScript ?

    Hi there,
    I Need some help over here, My web site produces a error only in the IE. firebug doesn't say anything about the error when executing over FF.

    Code:
    Line: 26
    Char: 5
    Error: Object Expected
    Code: 0
    still I couldn't find out the reason for the error. Is There anyone out there who can help me on this? Thanks a lot.
    Last edited by acoder; Oct 22 '08, 08:28 AM. Reason: Removed link
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    I notice that you've included some JavaScript files using conditional comments. Try commenting them out if you're not using jQuery, drupal, etc.

    Comment

    • RamananKalirajan
      Contributor
      • Mar 2008
      • 608

      #3
      Please check wether u have a file in this path

      [HTML]<link type="text/css" rel="stylesheet " media="all" href="/hunger/sites/all/modules/nice_menus/nice_menus.css? v" />[/HTML]
      Please check this one. the error is pointing to this line only. Just check this.

      Regards
      Ramanan kalirajan

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        That wouldn't result in a JavaScript error. IE is notorious for its sloppy line numbering.

        Comment

        • ak1dnar
          Recognized Expert Top Contributor
          • Jan 2007
          • 1584

          #5
          Thanks guys, I'll try that out. but it seems like removing jquery.js and drupal.js is bit difficult. need to read the the documentation to find out the way. I'll post back with the status. thanks again for all your help.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            I'm not sure why you're only including them for IE. Perhaps you could remove the conditional comments to include them for all browsers and see if you get errors in other browsers.

            Comment

            • ak1dnar
              Recognized Expert Top Contributor
              • Jan 2007
              • 1584

              #7
              Originally posted by acoder
              I'm not sure why you're only including them for IE. Perhaps you could remove the conditional comments to include them for all browsers and see if you get errors in other browsers.
              Actually acoder, I also need to remove those lines, but still I couldn't find those lines in the source code.It has buried somewhere in the drupal api.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Oh, I see. I didn't realise it was automatically generated. Have you checked the drupal docs for this problem?

                Comment

                • ak1dnar
                  Recognized Expert Top Contributor
                  • Jan 2007
                  • 1584

                  #9
                  Originally posted by acoder
                  Oh, I see. I didn't realise it was automatically generated. Have you checked the drupal docs for this problem?
                  Need more time to read those docs. Since I know the reason for the error, now it's easy for me. Thanks a lot for your help. I found those php codes which prints those "js" files, but removing them made more troubles, because it removes the "css" import lines too.

                  Comment

                  • ak1dnar
                    Recognized Expert Top Contributor
                    • Jan 2007
                    • 1584

                    #10
                    Hi,
                    Something interesting, recently I deleted the records on the "cache" table which holds the cached web pages of the drupal. and it solved the error on the IE browser too. may be some erroneous javascript code was there on the cached javascript files and that was the reason for the error. What I did actually, I manually executed "delete from cache" over the the drupal database.

                    @Moderators:
                    Please remove the url to the production site from my original post as the problem is now resolved.

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      Done. So a relatively simple solution in the end. Glad to hear that you managed to solve it :)

                      Comment

                      Working...