Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13

Thread: 3D Spin Menu

  1. #1
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3D Spin Menu

    I was wondering if anyone could me, I have downloaded several times the 3D Spin Menu from Java Script Kit, and when I try to put it into my website, via my editing page, it seems to think that there is a problem with a certain line? This is the information that was provided, it doesn't like the line:

    eye.isVertical = 0; //if it's vertical or horizontal [0|1]

    <html>
    <head>
    <!--Step 1: Add the below SCRIPT to the head of your page:-->
    <script type="text/javascript" src="spinmenu.js"></script>
    </head>

    <body>
    <p>Example Spin Menu:</p>

    <!--Step 2: Add the below SCRIPT to the body of your page where you want it to appear:-->

    <script type="text/javascript">

    /*
    3D Spin Menu- By Petre Stefan (http://www.eyecon.ro) w/ changes by JK
    Visit JavaScript Kit (http://www.javascriptkit.com) for script
    Keep this notice intact!
    */

    eye.isVertical = 0; //if it's vertical or horizontal [0|1]
    eye.x = 150; // x offset from point of insertion on page
    eye.y = 0; // y offset from point of insertion on page
    eye.w = 150; // item's width
    eye.h = 30; // height
    eye.r = 100; // menu's radius
    eye.v = 20; // velocity
    eye.s = 8; // scale in space (for 3D effect)
    eye.color = '#ffffff'; // normal text color
    eye.colorover = '#ffffff'; // mouseover text color
    eye.backgroundcolor = '#0099ff'; // normal background color
    eye.backgroundcolorover = '#990000'; // mouseover background color
    eye.bordercolor = '#000000'; //border color
    eye.fontsize = 12; // font size
    eye.fontfamily = 'Arial'; //font family
    if (document.getElementById){
    document.write('<div id="spinanchor" style="height:'+eval(eye.h+20)+'"></div>')
    eye.anchor=document.getElementById('spinanchor')
    eye.spinmenu();
    eye.x+=getposOffset(eye.anchor, "left") //relatively position it
    eye.y+=getposOffset(eye.anchor, "top") //relatively position it

    //menuitem: eye.spinmenuitem(text, link, target)
    eye.spinmenuitem("JavaScript Kit","http://www.javascriptkit.com");
    eye.spinmenuitem("Free JavaScripts","http://www.javascriptkit.com/cutpastejava.shtml");
    eye.spinmenuitem("JS Tutorials","http://www.javascriptkit.com/javaindex.shtml");
    eye.spinmenuitem("Advanced JS Tutorials","http://www.javascriptkit.com/javatutors/");
    eye.spinmenuitem("DHTML/ CSS Tutorials","http://www.javascriptkit.com/dhtmltutors/index.shtml");
    eye.spinmenuitem("Web building tutorials","http://www.javascriptkit.com/howto/");
    eye.spinmenuclose();
    }
    </script>

    <p align="left"><font face="arial" size="-2">This free script provided by<br>
    <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

    </body>
    Can anyone help?

    Thankyou,
    Julie

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,899
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    I thought that Javascript variable names could only include a-z 0-9 and the underscore character.

    Has something gone wrong so that your variables have a
    period in them (pretty sure that this is illegal!) instead of an underscore?

  • #3
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3D Spin Menu

    Hi Phil
    Thank you so much for replying, unfortunately we have never attempted anything like this and this is the first time we have ever had anything to do with javascripts etc. To show you how much we know about it, do you mean it is an illegal operation or illegal in the law sense? Im afraid what you said means nothing to us. Simply because we don't know alot about it.
    Thanking You
    Julie

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,899
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts

    Cool

    Sure, it is a Federal Offense these days to use a period in a Javascript variable name, especially if you cross a State line. It is also illegal in the sense of invalid (not correct JavaScript syntax).

    To be perfectly candid, if you really do have so little knowledge of JavaScript and computer programming (which really is a pretty complicated subject) I would respectfully suggest that either you drop the idea or pay someone to do it for you. Otherwise you are likely to spend a lot of frustrating time. Just because you own a few spanners does not mean that you can service your own car properly. Running before walking and all that ......

    Have you uploaded the file spinmenu.js to the correct directory in your website?

  • #5
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy 3D Spin Menu

    Well Phil I'll take that as a no on the leagal issue. Thanks for your comments, but if you don't get your hands dirty you will never learn to use those spanners. I like a challenge.
    Thanking you
    Julie

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sure, it is a Federal Offense these days to use a period in a Javascript variable name, especially if you cross a State line.
    No offence TheCasinoLodge. Too funny Philip M

    "eye" in "eye.isVertical" is probably a custom object that has a property called isVertical.

    Usually, when an error points to a particular line, the actual error is in the line above it. Having said that, it's the first line of script in the page which leads me to believe that the browser has never heard of "eye”.

    TheCasinoLodge, as Philip M said
    Have you uploaded the file spinmenu.js to the correct directory in your website?
    Also, what was the error message and do you have a test page we can look at?

  • #7
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy 3D Spin Menu

    Thank you Graeme for your helpful and constructive comments, it is appreiciated. We are actually trying to build our own website, (FIRST TIME) using ACEHTML 5 pro. As well as the "eye" problem, we cannot get the jist of how to make more than one javascript work together on one page. I have included the address to the script for the 3Dmenu, hopefully this will help you understand what we are trying to explain. Again thank you for your help.

    Julie



    http://www.wsabstract.com/script/script2/spinmenu.shtml

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry you must have misunderstood me.

    Do you have a test page that you have made with the menu in it? The orginal seems to work fine so it must be something in your page.

  • #9
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy 3D Spin Menu

    Sorry for that, this is a copy of the test page.
    <html>
    <!-- Creation date: 9/7/2003 -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title></title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="Unregistered user">
    <meta name="generator" content="AceHTML 5 Pro">
    </head>
    <body>
    <script type="text/javascript">

    /*
    3D Spin Menu- By Petre Stefan (http://www.eyecon.ro) w/ changes by JK
    Visit JavaScript Kit (http://www.javascriptkit.com) for script
    Keep this notice intact!
    */

    eye.isVertical = 0; //if it's vertical or horizontal [0|1]
    eye.x = 150; // x offset from point of insertion on page
    eye.y = 0; // y offset from point of insertion on page
    eye.w = 150; // item's width
    eye.h = 30; // height
    eye.r = 100; // menu's radius
    eye.v = 20; // velocity
    eye.s = 8; // scale in space (for 3D effect)
    eye.color = '#ffffff'; // normal text color
    eye.colorover = '#ffffff'; // mouseover text color
    eye.backgroundcolor = '#0099ff'; // normal background color
    eye.backgroundcolorover = '#990000'; // mouseover background color
    eye.bordercolor = '#000000'; //border color
    eye.fontsize = 12; // font size
    eye.fontfamily = 'Arial'; //font family
    if (document.getElementById){
    document.write('<div id="spinanchor" style="height:'+eval(eye.h+20)+'"></div>')
    eye.anchor=document.getElementById('spinanchor')
    eye.spinmenu();
    eye.x+=getposOffset(eye.anchor, "left") //relatively position it
    eye.y+=getposOffset(eye.anchor, "top") //relatively position it

    //menuitem: eye.spinmenuitem(text, link, target)
    eye.spinmenuitem("JavaScript Kit","http://www.javascriptkit.com");
    eye.spinmenuitem("Free JavaScripts","http://www.javascriptkit.com/cutpastejava.shtml");
    eye.spinmenuitem("JS Tutorials","http://www.javascriptkit.com/javaindex.shtml");
    eye.spinmenuitem("Advanced JS Tutorials","http://www.javascriptkit.com/javatutors/");
    eye.spinmenuitem("DHTML/ CSS Tutorials","http://www.javascriptkit.com/dhtmltutors/index.shtml");
    eye.spinmenuitem("Web building tutorials","http://www.javascriptkit.com/howto/");
    eye.spinmenuclose();
    }
    </script>

    <p align="left"><font face="arial" size="-2">This free script provided by<br>
    <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

    </body>
    </html>

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to include a link to the js file in the test page.

    This:

    <script type="text/javascript" src="spinmenu.js"></script>

    goes in the head section of the page. The file "spinmenu.js" also needs to be in the same directory as the test page

  • #11
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool 3D Spin Menu

    Oh thank you, thank you, thank you Graeme. success!!! We really appreciate your help. Could you just give us a pointer on how to make more then one javascript work on one page.
    Julie

  • #12
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Glad you got it working.

    You can have any amount of JavaScript in a single page provided that you use different variable names, function names and they don't try to access the same event (example: onload)

    This tutorial covers the issues:

    http://www.javascriptkit.com/javatut...iplejava.shtml

  • #13
    New Coder
    Join Date
    Sep 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool 3D Spin Menu

    I just wanted to say thanks again for your help. We have had a look at that link, but did'nt understand it. But we will get there with some persistence. thanks again for your help, very much appreciated.
    Julie


  •  

    Posting Permissions

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