Jump to content

Mouse Event


WorldDrknss

Recommended Posts

I am trying to close an auto suggestion box if a user would click anywhere on the window that is outside of the autosuggestdiv.

This is the code I am using:

function mouseclickbtn(e){
var mouseclickbtn = e.which;
if(mouseclickbtn == undefined){ mouseclickbtn = e.button; }
if(mouseclickbtn < 2){
	acObject = document.getElementById("autosuggestdiv");
	acObject.style.visibility = "hidden";
	acObject.style.height = "0px";
	acObject.style.width = "0px";
}
}

But it does not work.

Any suggestions.

 

TIA

Link to comment
https://forums.phpfreaks.com/topic/70422-mouse-event/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.