JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

No error but no functionality either

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
emehl
Guest





PostPosted: Thu Oct 02, 2003 8:36 am    Post subject: No error but no functionality either Reply with quote

Hello-

I purchased the Pro Version yesterday. I can't get it to function in my page.

I generated script and tested it and then followed instructions to paste it into all the correcct files and such and nothing happens. Not even any errors. In the source file for the html page there is no javascript generated. If I insert an 'alert("here");' into the coolmenupro.js it will only work through line

this.name=name; this.rel=items[0].pos=="relative"; this.root=[]; this.root.par=null;this.root.cd=[];

My code is as follows:
Code:
//var color = {border:"#666666", shadow:"#DBD8D1", bgON:"white", bgOVER:"#B6BDD2", imagebg:"#DBD8D1", oimagebg:"#B6BDD2"};
var css = {ON:"clsCMTopOn", OVER:"clsCMTopOver"};
var STYLE = {border:1, borders:[1,1,1,0], shadow:2, color:color, css:css};

var BLANK_IMAGE="images/b.gif";
var CM_STYLE = {"border":1, "shadow":2, "color":{"border":"#1DA0C5", "shadow":"#1384A4", "bgON":"#ffed96","bgOVER":"#AE3E2C", imagebg:"#DBD8D1", oimagebg:"#B6BDD2"}, "css":{"ON":"clsCMOn", "OVER":"clsCMOver"}};

var code="code";var url="url";var sub="sub";
var MENU_ITEMS = [
    {"pos":[5,5], "size":[25,150], "itemoff":[0,99], "leveloff":[24,0], "delay":600, "style":CM_STYLE},
    {code:"About IIHA", url:"about/index.htm", "target":"mainFrame",
    sub:[
        {"size":[25,100],"itemoff":[24,0],"leveloff":[24,0],"style":CM_STYLE},
        {code:"Story", url:"about/index.htm#story", "target":"mainFrame"},
        {code:"Mission", url:"about/index.htm#mission", "target":"mainFrame"},
        {code:"Faculty", url:"about/index.htm#faculty", "target":"mainFrame"}
        ]
    },
    {code:"Services", url:"services/index.htm", "target":"mainFrame",
    sub:[
        {"size":[25,100],"itemoff":[24,0],"leveloff":[24,0],"style":CM_STYLE},
        {code:"Readings", url:"services/index.htm#readings", "target":"mainFrame"},
        {code:"Seminars", url:"services/index.htm#seminars", "target":"mainFrame"},
        {code:"Business", url:"services/index.htm#business", "target":"mainFrame"},
        {code:"Lectures", url:"services/index.htm#lectures", "target":"mainFrame"},
        {code:"Workshops", url:"classes/workshops.htm", "target":"mainFrame"}
        ]
    },
    {code:"Study Programs", url:"classes/index.htm", "target":"mainFrame",
    sub:[
        {"size":[25,200],"itemoff":[24,0],"leveloff":[24,0],"style":CM_STYLE},
        {code:"Life Purpose Support Group", url:"classes/supportgroup.htm", "target":"mainFrame"},
        {code:"Hand Analysis Intensive ", url:"classes/handintensive.htm", "target":"mainFrame"},
        {code:"Year Long Training", url:"classes/yearlong_training.htm", "target":"mainFrame"},
        {code:"The Graduate Study Program", url:"classes/gradclasses.htm", "target":"mainFrame"}
        ]
    },
    {code:"Products", url:"tapes/index.htm", "target":"mainFrame",
    sub:[
        {"size":[25,200],"itemoff":[24,0],"leveloff":[24,0],"style":CM_STYLE},
        {code:"Workshops on Tape", url:"tapes/tape_workshop.htm", "target":"mainFrame"},
        {code:"Lectures on Tape", url:"tapes/lectures.htm", "target":"mainFrame"},
        {code:"Grad Classes on Tape", url:"tapes/tapes_grad.htm", "target":"mainFrame"},
        {code:"Hand Analysis Journal", url:"publications/journal_handanalysis.htm", "target":"mainFrame"},
        {code:"Hand Analysis Newsletter", url:"publications/newsletter_handanalysis.htm", "target":"mainFrame"},
        {code:"Graduate Newsletter", url:"publications/newsletter_graduate.htm", "target":"mainFrame"},
        {code:"Order Form", url:"order/index.htm", "target":"mainFrame"}
        ]
    },
    {code:"Calendar", url:"calendar/index.htm", "target":"mainFrame",
    sub:[
        {"size":[25,200],"itemoff":[24,0],"leveloff":[24,0],"style":CM_STYLE},
        {code:"Northern California", url:"calendar/index.htm#nocal", "target":"mainFrame"},
        {code:"Zurich", url:"calendar/index.htm#zurich", "target":"mainFrame"}
        ]
    },
    {code:"Contact", url:"contacts.htm", "target":"mainFrame",
    sub:[
        {"size":[25,200],"itemoff":[24,0],"leveloff":[24,0],"style":CM_STYLE},
        {code:"IIHA Readers", url:"contacts.htm#iihaReaders", "target":"mainFrame"},
        {code:"Other Palmistry Schools", url:"contacts.htm#otherSchools", "target":"mainFrame"},
        {code:"Other Readers", url:"contacts.htm#otherReaders", "target":"mainFrame"}
        ]
    }
];


in my htm file this is what I have:
Code:
<script type="text/javascript">
var menu = new COOLjsMenuPRO("MainMenu", MENU_ITEMS);
menu.initTop();
menu.init();
</script>
</body>
</HTML>


as well as
Code:
<script type="text/javascript" src="coolmenupro.js"></script>
<script type="text/javascript" src="menuitems.js"></script>
<!-- End Preload Script -->
</HEAD>


Any idea what to do? I probably am missing the obvious.

Thanks
Back to top
GTHOG
Guest





PostPosted: Tue Oct 07, 2003 6:31 pm    Post subject: Reply with quote

Are you using Netscape? I found that Netscape is more strict with JavaScript syntax than IE and so would require semi-colons after blocks in single line code (ie. the ";" or a new-line is required after the "}" in "function x(){...};function y(){...};"

I had COOLjsMenu 1.8.1 which had a several of these. I fixed 'em myself and got it working.

Hint: in Netscape, to see if there where any JavaScript errors, after displaying the page with the error(s), enter "javascript:" in the URL field.
Back to top
AlexKunin
Developer


Joined: 03 Jan 2003
Posts: 1191

PostPosted: Thu Oct 09, 2003 3:27 am    Post subject: Reply with quote

Actually there are two JavaScript errors and IE screams about them... Uncomment the line starting with "var color ..." and add "menu.show()" after "menu.init()".
Back to top
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1