[Javascript] Click on scrollbar ?

Laurent Muchacho LaurentM at london.virgin.net
Tue Jul 6 09:49:38 CDT 2004


Hi Tim,

if you just alert event.srcElement it return alert then I thought I could
loop the object then I built this into your function I put a few link at the
bottom who might help 

	function launch_debug_window(htmlStr){
		var str = "";
			str += '<html><head><title>Virgin.net Webmail
Help</title></head>'
				+  '<body>'+ htmlStr +'</body>'
				+  '</html>';
		var newWin =
window.open('','debugWindow','width=350,height=410,resizable=yes,status=no,l
ocation=no,menubar=no,scrollbars=yes');
		newWin.document.open();
		newWin.document.write(str);
		newWin.document.close();
		newWin.focus();
	}
	
	document.onmousedown = butPress

	function butPress() {
		var str="";
		
		for(var prop in event.srcElement){
			str += " "  + prop + " is " + event.srcElement[prop]
+ ";<br>\n"
		}
	
		launch_debug_window(str);
	}






this might help sorry it's only IE 

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/doscroll.a
sp

http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollWidth.htm
http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollTop.htm



-----Original Message-----
From: Tim Makins [mailto:spindrift at oceanfree.net]
Sent: 06 July 2004 15:13
To: [JavaScript List]
Subject: [Javascript] Click on scrollbar ?


document.onmousedown = butPress

function butPress() {
var temp = event.srcElement.name
}

How can I trap/identify when someone has clicked on a scrollbar?

temp just returns undefined.

Tim in Ireland.
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


This E-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you have received this E-mail in error please notify the system manager.  This message contains confidential information and is intended only for the individual named.  If you are not the named addressee you should not disseminate, distribute or copy this E-mail.



More information about the Javascript mailing list