>>>Does anyone know if it is possible to implement a custom VFP context/shortcut menu on the web browser control hosted in a VFP form?
>>
>>Any DHTML element to which you want to attach your own contextmenu needs to have a redirection into your JavaScript code, like this
>>
>>
onContextMenu="rclick(event);"
>>
>>where rclick(e) is your piece of JavaScript:
>>
>>
function rclick(e)
>>{
>> var targ
>> if (!e)
>> var e = window.event;
>> if (e.target)
>> targ = e.target
>> else if (e.srcElement)
>> targ = e.srcElement;
>> e.returnValue=false;
>> oFrm=document.forms[0];
>> oFrm.action="YourProtocolHere:"+targ.name;
>> oFrm.submit();
>> return false;
>>}
>>
>>Then you catch your protocol in oBrowser.BeforeNavigate2, make sure cancel=.t. so it doesn't try to navigate anywhere. You may also add code to catch some coordinates (browser's event object has a few properties which may help, but you'll need to recalculate the position) so to know where to show your VFP popup.
>
>Thanks Dragan. Your code gives me a starting point.
Sorry that I couldn't do the rest, but that'd be proprietary code. I figure you'd figure it out.