views:

33

answers:

1

i am using jquery context menu on a div inside an update panel. i read that i should be using ScriptManager.RegisterStartupScript to register the script, and that is what i did.

on partial post back the menu appears on the screen even without right clicking on the div. Moreover if i issued a right click on the div the contextMenu is launched as it normally would.

A: 

This sounds like just a styling issue, you need to specifyin your CSS that the contextMenu is hidden by default, otherwise it'll work, but also show up before you clicked to show it, which is what you describe.

If the menu is for example this:

<div class="contextMenu">.....</div>

Make sure you have corresponding CSS to hide it, like this:

.contextMenu { display: none; }

This will keep it hidden until you right click to show it :)

Nick Craver