Just a quick one which is the quickest and most effective way of overloading the button click event on a webbrowser object?
Cheers
Mark
10-12-2002 at 11:05 AM
|
vbgen Level: Moderator Registered: 10-10-2002 Posts: 876
Re: Overloading Button click event
help...
what do you mean by 'overloading' the button click?
____________________________
Been busy trying to take a second degree <--it's not working out...
10-12-2002 at 06:18 PM
|
Harrism Level: Guest
Re: Overloading Button click event
Overload (intercept) the default browser message handler with you own handler and set it to disregard the right button click event but respond to other event in the normal fashion
Haha ive just sorted it, some java code on the pages works a treat intercepts the right click
Cheers
Mark
11-12-2002 at 11:21 AM
|
vbgen Level: Moderator Registered: 10-10-2002 Posts: 876
Re: Overloading Button click event
would you mind sharing it with us here at the forum?
____________________________
Been busy trying to take a second degree <--it's not working out...
11-12-2002 at 07:12 PM
|
Harrism Level: Guest
Re: Overloading Button click event
Not a problemski
<script language=JavaScript>
<!--
var message="Source Not Available.";
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}