Click to See Complete Forum and Search --> : How to handle a click and do nothing?


korg
01-06-2004, 02:14 PM
Hi again!

I'd like to know how to handle a click on a web page and do nothing with that click. I explain: I want to make the mouse click unavailable until the entire page is loaded. So, I'd handle the click at the beginning of the page load to do nothing with it, and then, when the page is completely loaded, I'd like to give back the mouse click handle to the window, so the page can work properly.

Does somebody can help me please??


Thanks a lot!

Korg

David Harrison
01-07-2004, 09:45 AM
Maybe this will work, it's untested but I'm pretty confident. It might block the links though, alternatively it might not block anything.

<script type="text/javascript><!--

var pleh=false;

function done(){

if(!pleh){return false;}
else{return:true;}

}

//--></script>

</head>

<body onload="pleh=true;" onclick="return done();">