<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>> From: riegel@clearimageonline.com<BR>> Subject: Re: [Javascript] Code optimization<BR>> Date: Mon, 14 Aug 2006 17:52:43 -0400<BR>> To: javascript@LaTech.edu<BR>> <BR>> Hello,<BR>> <BR>> I need some help creating an 2 onclick events for a div. You can see <BR>> my sample code at:<BR>> <BR>> http://clearimageonline.com/projects/filebrowser/filebrowser.html<BR>> <BR>> If you look at the page listed above you can see my markup has been <BR>> simplified to a div and many child div's. I am using javascript to <BR>> create the contents of the div's, It works as expect so far. What I <BR>> would like to do is create an event for clicking on the resulting <BR>> image and a separate event for clicking on the text. Also as a side <BR>> note is there a way to make the mouse look like it is hovering a link <BR>> instead of text?<BR>> <BR>> Thanks for any help.<BR> <BR>> Terry<BR>
<BR>
I like the looks of it. Nice icons. Nice item-selected color. Nicely handled click & <FONT><FONT>dblclick.</FONT></FONT><BR>
Yes, the text cursor looks ugly. But two "<FONT>onclick"</FONT> events? You don't need that!<BR>
<BR>
Not sure if I really understand your demand but certainly:<BR>
What you need is, one "click" event, handling two separate/different functions at best.<BR>
<BR>
You can set the cursor directly from <FONT>css,</FONT> with: "cursor: pointer", -no script needed.<BR>
<BR>
But soon, you will need click select to deselect previous, soon after you will need dblclick<BR>
prevent text selection. Or later, how to multiple select. And at the end, what about keyboard<BR>
support, tab select etc? DIV elements can't receive focus. So, soon after you will find your self<BR>
wondering how about wrapping them divs in ancors tags so that files can receive tabbed focus?<BR>
And so on....<BR>
<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR> Troy III<BR> progressive art enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><BR><br /><hr />Express yourself instantly with Windows Live Messenger! <a href='http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=joinmsncom/messenger' target='_new'>Windows Live Messenger!</a></body>
</html>