Click to See Complete Forum and Search --> : i have a menu activated onClick...


xataku_nakusute
07-22-2003, 12:10 AM
i have a menu that is opened upon onClick....
but some times, when i click it again to close the menu....it highlights the word located within the td that activates the menu.....
here it is (http://www.angelfire.com/yt3/eratech/index.html)

if theres a way to get rid of this, please tell me

thanx

cacalex
07-22-2003, 11:26 AM
var objMenu,objxoffset,objyoffset
function mousedown()
{
objMenu = event.srcElement.document.all
X=event.clientX;
Y=event.clientY;
}
function mousemove()
{
if (objMenu)
{
event.returnValue = false
}
}
function DblClick()
{
{
objMenu = event.document.all.srcElement
X=event.clientX;
Y=event.clientY;
}
if (objMenu)
{

event.returnValue = false
}
}
document.onmousedown = mousedown;
document.onmousemove = mousemove;
document.onDblClick = DblClick;
document.onmouseup = new Function("objMenu = null")
document.onselectstart = mousedown;



If you call this script AFTER your menu is expand, it will not make text selection possible...

I'm not saying that it will then make the SECOND click working...
Only unselectable text...

xataku_nakusute
07-22-2003, 02:40 PM
thanx and all for the code....but where would you put it?
(my sites using mostly html....cuz im not too great in js..)

cacalex
07-22-2003, 03:26 PM
best thing to do will be to put the code in a JS file, an then call it from th place where the "click action" will take place...