I would like to ask as to how to capture a context menu item? Currently I have a <form>
and a hyperlink. What I'm planning to do is when the user right-clicks the link and selects either "Open in new window" or "Open in new tab", the form.submit method will be fired.
Here's a sample "idea" code
HTML
<form id='MyForm' method='post'>
<div>
<a id='MyLink' href="#">Click Me</a>
</div>
</form>
JQuery
$("#MyForm").submit(function(){
// if a standard context menu item is selected (open in new tab/window)
if(true) {
this.target = "_blank";
}
else {
this.target = "MyForm";
}
this.action = "MyNewPage.aspx";
//Do something here
});