Hi all,
My code is like this:
<html>
<body>
<head>
<script type=”text/Javascript”>
function load(e){
if(!e){
e = window.event;
}
var button = e.which;
//document.write(button);
if(button==1) {
//document.write(“You have clicked left button”);
window.open(‘http://www.yahoo.com’,’_self’);
}
else if(button==2) {
//document.write(“You have clicked middle button”);
window.open(‘
}
}
</script>
</head>
<body>
<a href=”
</body>
</html>
When i press middle click it works fine it is opening yahoo in a new window. But when i press left click it is opening google page. When i uncomment document.write it is displaying the message about the left button and opening yahoo in the same window. How can i modify the above code in so that the link opens in the same window with out the message and also not using document.href because when i press the back in the browser link display will change to yahoo in that case. I hope i am clear.
bye
kiran