javascript error: Object expected

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erik-Jan Bakker

    javascript error: Object expected

    Hello,

    I am stuck with a weird javascript problem.... ;-(
    Maybe it's somehting very simple, but I am really stuck in it, right
    now.

    What's the matter....
    When place my website at a different hosting provider my webpage menu
    generates the javascript error:

    Line: 26
    Char: 1
    Error: Object expected
    Code: 0

    I still uses AllWebMenus for building the menu. But I can't find the
    error metioned regarding
    line 26.

    I hope someone can get me on the right track again...

    greets,
    Erik-Jan Bakker

    Here are some details

    =============== ===========
    This is my source of the webpage:
    =============== ===========
    <html>
    <head>
    <title>Menu</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <link rel="stylesheet " href="Groot.css " type="text/css">
    </head>

    <body bgcolor="#8fcfc 2" text="#000000"
    background="afb eeldingen/menupand.jpg" link="#000000" vlink="#000000"
    alink="#000000" >

    <!-- ******** BEGIN ALLWEBMENUS CODE FOR grootmenu ******** -->
    <img name='awmMenuPa thImg-grootmenu' id='awmMenuPath Img-grootmenu'
    src='./awmmenupath.gif ' alt=''>
    <script type='text/javascript'>var MenuLinkedBy='A llWebMenus [2]',
    awmBN='500'; awmAltUrl='';</script>
    <script src='grootmenu. js' language='JavaS cript1.2'
    type='text/javascript'></script>
    <script type='text/javascript'>awm BuildMenu();</script>
    <!-- ******** END ALLWEBMENUS CODE FOR grootmenu ******** -->
    </body>
    </html>

    =============== ==========
    This is my source of grootmenu.js:
    =============== ==========
    //----------DHTML Menu Created using AllWebMenus PRO ver
    3.1-#500---------------
    var awmMenuName='gr ootmenu';
    var awmLibraryPath= '/awmData-grootmenu';
    var awmImagesPath='/awmData-grootmenu';
    var awmSupported=(n avigator.appNam e +
    navigator.appVe rsion.substring (0,1)=="Netscap e5" || document.all ||
    document.layers || navigator.userA gent.indexOf('O pera')>-1)?1:0;
    if (awmAltUrl!='' && !awmSupported)
    window.location .replace(awmAlt Url);
    if (awmSupported){
    var awmMenuPath;
    if (document.all) mpi=document.al l['awmMenuPathImg-grootmenu'].src;
    if (document.layer s)
    mpi=document.im ages['awmMenuPathImg-grootmenu'].src;
    if (navigator.appN ame +
    navigator.appVe rsion.substring (0,1)=="Netscap e5" ||
    navigator.userA gent.indexOf('O pera')>-1)
    mpi=document.ge tElementById('a wmMenuPathImg-grootmenu').src ;
    awmMenuPath=mpi .substring(0,mp i.length-16);
    var nua=navigator.u serAgent,script No=(nua.indexOf ('Gecko')>-1)?2:((document .layers)?3:((nu a.indexOf('Oper a')>-1)?4:((nua.inde xOf('Mac')>-1)?5:1)));
    document.write( "<SCRIPT
    SRC='"+awmMenuP ath+awmLibraryP ath+"/awmlib"+scriptN o+".js'><\/SCRIPT>");
    var n=null;
    awmzindex=1000;
    }
    var awmSubmenusFram e='mainframe';
    var awmSubmenusFram eOffset;
    var awmOptimize=0;
    function awmBuildMenu(){
    if (awmSupported){
    awmImagesColl=['groot-sub.gif',10,10, 'groot-sub2.gif',10,10];
    awmCreateCSS(1, 2,1,'#FFFFFF',' #000000',n,'14p x
    Arial',n,'none' ,2,n,0,4)
    awmCreateCSS(0, 1,0,n,'#FFFFFF' ,n,n,n,'outset' ,2,'#C0C0C0',0, 0)
    awmCreateCSS(1, 2,0,'#FFFFFF',' #008E89',n,'bol d 12px
    Arial',n,'none' ,1,n,5,1)
    awmCreateCSS(0, 2,0,'#008E89',n ,n,'bold 12px Arial',n,'none' ,1,n,5,1)
    awmCreateCSS(1, 2,0,'#FFFFFF',' #008E89',n,'bol d 12px
    Arial',n,'none' ,1,n,5,0)
    awmCreateCSS(0, 2,0,'#008E89',n ,n,'bold 12px Arial',n,'none' ,1,n,5,0)
    var s0=awmCreateMen u(0,0,0,0,1,0,0 ,5,0,30,30,0,0, 1,0,n,"",n,1,1, 1,0,n,n);
    it=s0.addItem(2 ,3,3,"De Letselschade
    Site",n,n,"","" ,n,n,n,"letsels chadesite.htm", "mainframe" );
    it=s0.addItemWi thImages(4,5,5, "Letselscha de
    algemeen",n,n," ",n,n,n,0,0,0,0 ,1,1,"",n,n,n,n ,n);
    it=s0.addItemWi thImages(4,5,5, "Groot Expertisebureau
    b.v.",n,n,"",n, n,n,0,0,0,0,1,1 ,"",n,n,n,n, n);
    it=s0.addItemWi thImages(4,5,5, "Nieuwsbrieven" ,n,n,"",n,n,n,0 ,0,0,0,1,1,"",n ,n,n,n,n);
    it=s0.addItem(2 ,3,3,"Kosten",n ,n,"","",n,n,n, "kosten.htm","m ainframe");
    it=s0.addItemWi thImages(4,5,5, "Overige
    diensten",n,n," ",n,n,n,0,0,0,0 ,1,1,"",n,n,n,n ,n);
    it=s0.addItem(2 ,3,3,"Reaktie", n,n,"","",n,n,n ,"reaktie.htm", "mainframe" );
    s0.pm.buildMenu ();
    }}
  • Evertjan.

    #2
    Re: javascript error: Object expected

    Erik-Jan Bakker wrote on 09 nov 2003 in comp.lang.javas cript:
    [color=blue]
    > I still uses AllWebMenus for building the menu. But I can't find the
    > error metioned regarding
    > line 26.
    >
    > I hope someone can get me on the right track again...
    >[/color]

    ErikJan,

    als ik alle false line-returns uit de js file haal, blijft aleen over, dat
    de functie awmCreateCSS() niet gedefinieerd is.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • VK

      #3
      Re: javascript error: Object expected

      Check all paths are correct after transferring to the new server.

      1. <script src='grootmenu. js' language='JavaS cript1.2'
      type='text/javascript'></script>
      2. var awmMenuName='gr ootmenu';
      3. var awmLibraryPath= '/awmData-grootmenu';
      4. var awmImagesPath='/awmData-grootmenu';


      Comment

      • Erik-Jan Bakker

        #4
        Re: javascript error: Object expected

        "VK" <schools_ring@y ahoo.com> wrote in message news:<3fae9c02$ 0$18548$9b622d9 e@news.freenet. de>...[color=blue]
        > Check all paths are correct after transferring to the new server.
        >
        > 1. <script src='grootmenu. js' language='JavaS cript1.2'
        > type='text/javascript'></script>
        > 2. var awmMenuName='gr ootmenu';
        > 3. var awmLibraryPath= '/awmData-grootmenu';
        > 4. var awmImagesPath='/awmData-grootmenu';[/color]

        All these paths are correct.
        I have checked them again.

        Comment

        • Fabian

          #5
          Re: javascript error: Object expected

          Erik-Jan Bakker hu kiteb:
          [color=blue]
          > "VK" <schools_ring@y ahoo.com> wrote in message
          > news:<3fae9c02$ 0$18548$9b622d9 e@news.freenet. de>...[color=green]
          >> Check all paths are correct after transferring to the new server.
          >>
          >> 1. <script src='grootmenu. js' language='JavaS cript1.2'
          >> type='text/javascript'></script>
          >> 2. var awmMenuName='gr ootmenu';
          >> 3. var awmLibraryPath= '/awmData-grootmenu';
          >> 4. var awmImagesPath='/awmData-grootmenu';[/color]
          >
          > All these paths are correct.
          > I have checked them again.[/color]

          Where do you have it online?


          --
          --
          Fabian
          Visit my website often and for long periods!


          Comment

          • Erik-Jan Bakker

            #6
            Re: javascript error: Object expected

            "Fabian" <lajzar@hotmail .com> wrote in message news:<bomgu7$1d fnc0$1@ID-174912.news.uni-berlin.de>...[color=blue]
            > Erik-Jan Bakker hu kiteb:
            >[color=green]
            > > "VK" <schools_ring@y ahoo.com> wrote in message
            > > news:<3fae9c02$ 0$18548$9b622d9 e@news.freenet. de>...[color=darkred]
            > >> Check all paths are correct after transferring to the new server.
            > >>
            > >> 1. <script src='grootmenu. js' language='JavaS cript1.2'
            > >> type='text/javascript'></script>
            > >> 2. var awmMenuName='gr ootmenu';
            > >> 3. var awmLibraryPath= '/awmData-grootmenu';
            > >> 4. var awmImagesPath='/awmData-grootmenu';[/color]
            > >
            > > All these paths are correct.
            > > I have checked them again.[/color]
            >
            > Where do you have it online?
            >
            >
            > --[/color]


            At vuurwerk.nl

            Comment

            • Lisa Lasch

              #7
              Re: javascript error: Object expected

              >[color=blue]
              >
              > At vuurwerk.nl[/color]


              Actually, I couldnt find an AllWebMenus menu in the link you supplied.
              However, the error you mention has definitely to do with a missing
              file /directory. Are you 100% sure you have uploaded the files in the
              right locations? Have you checked the correct case for the file and
              directory names? (check out the fact that the awmData-menuname
              directory has a capital D which you will need to specify...).

              If you still have any problems do not hesitate to contact us at
              support @likno.com

              Best regards

              Lisa Lasch
              Likno Development Team

              Comment

              • Erik-Jan Bakker

                #8
                Re: javascript error: Object expected

                lisa@likno.com (Lisa Lasch) wrote in message news:<157cb66d. 0311100540.10cc 249a@posting.go ogle.com>...[color=blue][color=green]
                > >
                > >
                > > At vuurwerk.nl[/color]
                >
                >
                > Actually, I couldnt find an AllWebMenus menu in the link you supplied.
                > However, the error you mention has definitely to do with a missing
                > file /directory. Are you 100% sure you have uploaded the files in the
                > right locations? Have you checked the correct case for the file and
                > directory names? (check out the fact that the awmData-menuname
                > directory has a capital D which you will need to specify...).
                >
                > If you still have any problems do not hesitate to contact us at
                > support @likno.com
                >
                > Best regards
                >
                > Lisa Lasch
                > Likno Development Team[/color]

                Problem solved!

                Instead of :
                var awmLibraryPath= '/awmData-grootmenu';
                var awmImagesPath='/awmData-grootmenu';

                I used:
                var awmLibraryPath= '';
                var awmImagesPath=' ';

                and placed all the necessary files in the root of the site.
                Now it works fine.

                I know this is a workaround, but it helps me out.
                I checked serveral times de directory names and I am sure
                it was alright (also with a capital "D"). Strange isn't it?

                Comment

                Working...