PDA

View Full Version : Right Click Menu errors


qupe
03-09-2003, 02:16 AM
I am currently trying to design a website. The problem I am having is that after using the right-click menu (this one http://www.javascriptkit.com/script/script2/rightclickmenu.shtml )

When right clicking as if going to save a picture but realising I can't if I then move my mouse up over my drop down menu created in Xara Webstyle it errors and I cant move around the site.

Now I have used the validator in Acehtml pro and it doesn't pick up any errors.

So basically I am right clicking, then moving my mouse over my drop down menu and I get an error in the script.

Is this likely to be cause by the Xaramenu javascript? Are the two scripts conflicting? Only a refresh means I can use the drop down menu

Please help I am a Java newbie.

qupe
03-09-2003, 02:24 AM
<head>
<SCRIPT src="rightmenu.js" type=text/javascript>

//Right-click menu- By Eyecon (http://www.webteam.ro)
//Slight modifications by JK //Visit JavaScript Kit (http://javascriptkit.com) for script

</SCRIPT>

<style>
<!--
#men {
BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; Z-INDEX: 1; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; POSITION: absolute; TOP: 0px
}
#men A {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 4px; MARGIN: 1px 1px 1px 16px; FONT: 12px sans-serif; WIDTH: 100%; PADDING-TOP: 3px; HEIGHT: 100%; TEXT-DECORATION: none
}
.ico {
BORDER-RIGHT: medium none; BORDER-TOP: medium none; FLOAT: left; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none
}
//-->
</style>
</head>

<body BGCOLOR=BLACK TEXT=WHITE link="blue" alink="red" vlink="blue" >
<div align="center">
<SCRIPT type=text/javascript>
//MENU TITLE
eyesys_title="JavaScript Kit Menu"
//TITLE BACKGROUND COLORS
eyesys_titlecol1="black"
eyesys_titlecol2="blue"
//TITLE COLOR
eyesys_titletext="white"
//MENU & ITEM BACKGROUND COLOR
eyesys_bg="#229922"
//ITEM BACKGROUND COLOR ON MOUSE OVER
eyesys_bgov="#006699"
//MENU COLOR
eyesys_cl="white"
//MENU COLOR ON MOUSE OVER
eyesys_clov="white"
//MENU WIDTH
eyesys_width=160
//menu starts here
eyesys_init()
//menu item sintax: eyesys_item(text,icon,link)
//for no icon use 'null'
eyesys_item('JavaScript Kit','home.gif','http://www.javascriptkit.com')
eyesys_item('Dynamic Drive',null,'http://www.dynamicdrive.com')
eyesys_item('Freewarejava.com',null,'http://www.freewarejava.com')
eyesys_item('Coding Forums',null,'http://www.codingforums.com')
eyesys_item('Web Review',null,'http://www.webreview.com')
eyesys_item('Cool Text',null,'http://www.cooltext.com')
eyesys_item('GUI Stuff',null,'http://www.guistuff.com')
//mene closes here
eyesys_close()
</SCRIPT>

<table width="800" border="1" bordercolor"" cellpadding="3" cellspacing="0">
<tr>
<td><center>
<script src="xaramenu.js"></script><script webstyle3 src="menutop1.js"></script>
<img src="logo.gif">
</center></td>
</tr>
</table>

qupe
03-10-2003, 11:52 AM
Is there anything else I can show to help someone help me?

Please

Are the 2 scripts conflicting?

:confused:

RoyW
03-10-2003, 03:05 PM
You do not state what the error is (Object expected?)

There are 3 external ".js" files

rightmenu.js

and

xaramenu.js
menutop1.js

Even if you posted all that information it would be very difficult to find out the error as humans are not as good as computers at detecting errors.

If you post a link to the page in question we can see first hand where the error is and if it is fixable.

qupe
03-10-2003, 07:49 PM
Thanks for looking Roy.

I have set up an example on my personal webspace.

Here is the url

*removed*


the error I get is invalid argument. the right-click menu is from javascriptkit.com link above and the drop down menu has been created using Xara Webstyle

Any help would be much appreciated

RoyW
03-10-2003, 10:10 PM
Both scripts use "mx" and "my"

Change the script "rightmenu.js" from this

function init(){
mx=event.clientX;
my=event.clientY;
menx=window.screenLeft+mx;
meny=window.screenTop+my;

to this

function init(){
var mx=event.clientX;
var my=event.clientY;
menx=window.screenLeft+mx;
meny=window.screenTop+my;

qupe
03-11-2003, 12:37 AM
Excellent many thanks.

So they were both trying to use the same thing!?!

Right I am going to go buy a book here in the UK and start to learn Java.

Once again many thanks