[thelist] unobtrusive onmouseover/onmouseout?

Jon Hughes hughesj at firemtn.com
Mon Jun 18 11:11:28 CDT 2007

I looked on google, but nothing seems to work.  I'm sure I am just doing
it wrong, but I can't figure out how...

I have this code:


<div id="pop01">This is going to pop up...">
<a href="mypage.htm"><img src="myimg.jpg" alt="" border="0"
onmouseover="javascript: detpopup('pop01');" onmouseout="javascript:
detpopup('pop01');" /></a>


function detpopup(obj) {
			var obj = document.getElementById(obj);
			if(obj.getAttribute('title') != 'open') 
			id = obj.getAttribute('id');
			obj.style.height = '300px';
			obj.style.width = '600px';
			} else {
			obj.style.height = '1px';
			obj.style.width = '1px';


This works, which is fantastic (for me) but I don't want to have the
"onmouseover" and "onmouseout" in the HTML.

I have tried having:

Obj.onmouseover = function() {

But that doesn't work...

More information about the thelist mailing list