Click to See Complete Forum and Search --> : Redirecting on a mouse click


BigLad
07-09-2003, 10:58 AM
Hi guys/gals

I'm not sure if this is possible with javaScript (my knowledge of it is pretty basic) but I basically need to be able to redirect to another webpage if the user clicks anywhere on the page (not just buttons, links etc)

The reason I want it is I need to make a slide show, which is easy enough by using timed redirects but I need to be able to switch to another page if the mouse is clicked anywhere on the page (this is going to be used on a touch screen so Ideally I need to be able to do it if the screen is touched as this generates a mouse click)

any suggestions? in Javascript or anything else that could help me :cool:

Khalid Ali
07-09-2003, 11:13 AM
Here you go

<script type="text/javascript">
<!--
function MUp(e){
window.location.href = "newpage.html"
}
if(!document.all){
document.captureEvents("Event.MOUSEUP");
}
document.onmouseup = MUp;
//-->
</script>

BigLad
07-10-2003, 02:47 AM
Whoa!!!! :o

I bow down to your Javascript skills :cool:
thats exactly what I need :)

Thanks for your assistance

Khalid Ali
07-10-2003, 08:25 AM
You are welcome ..:D