Submit Your Article Forum Rules

Results 1 to 2 of 2

Thread: javascript problem with live Menu

  1. #1
    Member Silverback's Avatar
    Join Date
    Mar 2008
    Posts
    41

    javascript problem with live Menu

    I am desperately hoping that someone here might be in a position to guide me.

    I have just begun working with javascript and am trying to sort out the liveMenu from SourceForge.

    I have had a number of issues with it that I was able to work through but this last one is driving me mad. So here it is.

    I have uploaded a test site if anyone is interested (www.natural-health-labs.com/LiveMenuTest/)

    1 . I am calling all javascript from a JSCRIPT folder

    2. The file that seems to be the issue AND stopping the slider to operate for the liveMenu is Menu_head.js and the content is as follows:

    Code:
        liveMenu.initOnLoad('liveMenu2', {('myMenu', { effect: 'slide' });
        beforeShow: function () { 
        this.opener.className = 'lm-selected-item';
        },
        beforeHide: function () {
        this.opener.className = '';
        }
        });
    This is the error I am getting on Firefox
    Code:
    Error: invalid property id
    Source File: http://www.natural-health-labs.com/LiveMenuTest/JSCRIPT/Menu_head.js
    Line: 1, Column: 35
    Source Code:
     liveMenu.initOnLoad('liveMenu2', {('liveMenu', { effect: 'slide' });
    I have tried to find the proper coding for this in various locations but to no avail.

    If someone who knows the answer could give me a push in the proper direction I would appreciate it.

    I realize that for those who know javascript are looking at this saying, "This is pretty basic stuff." Before you ask; the answer would like be yes ... I regret not understanding javascript code!

    Silverback
    Ayurvedic Medicinal Herbs - Choose the potency of nature!

  2. #2
    Senior Member
    Join Date
    Dec 2007
    Posts
    526
    Error: invalid property id

    (This is most likely in reference to an HTML id, which usually looks something like this <div id="theID"></div>)

    Source File: http://www.natural-health-labs.com/L...T/Menu_head.js

    (That is the location that the error is occuring)

    Line: 1, Column: 35

    (That is the position in the file where the error is occuring)

    Source Code:
    liveMenu.initOnLoad('liveMenu2', {('liveMenu', { effect: 'slide' });

    (Never seen that in FireFox output, it must be the function where the error is occuring.)




    liveMenu.initOnLoad('liveMenu2', {('myMenu', { effect: 'slide' });

    liveMenu - is the Object. (The virtual object which exists in virtual space, or in memory)

    initOnLoad - is a function, you can tell what a function is when you see the brackets follow a name initOnLoad()

    so....

    liveMenu.OnLoad is a call to a function that belongs to the Object liveMenu



    ('liveMenu2', {('myMenu', { effect: 'slide' });

    These are the arguments passed to the function... I am going to guess that 'liveMenu2' is the ID which should exist in the HTML document that has the menu installed.

    So... open up the HTML file and look to see if the ID exists anywhere.



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

    That might fix it, but I am unsure...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •