nadeemshafi9 Posted January 23, 2007 Share Posted January 23, 2007 hello guysi have a simple timing construct, when a user pases the mouse over an item the time gets recorded and when they leave mouseOut the time gets recorded using A-sync js + php, Big PROBwhen the mouse gooes over the text in the cell that has the onMouseOver and onMouseOut event handelers attached, if it goes over text it assumes that its not over the cell anymore and handles the onMouseOut event how do i ovrcome this and i would like to handle the event for the entire cell not the contents inside it, and i cant because it gets disrupted if the mouse passes over the text whithin the cell.Thanks for any help Quote Link to comment Share on other sites More sharing options...
fenway Posted January 23, 2007 Share Posted January 23, 2007 This is most likely an event bubbling issue. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted January 24, 2007 Author Share Posted January 24, 2007 fenway u have a processor in ur brain dont youthanks alot[code] <td onMouseOver="recordTimeOnMouseOver(<?php echo $row["id"]?>)" onMouseOut="recordTimeOnMouseOut()" valign="top" width="250px" style="text-align: center; z-index: 1;"> <div onMouseOver="cancelBubble()" onMouseOut="cancelBubble()"> <a href="showItem.php?id=<?php echo $row["id"]?>"><img src="img.php?id=<?php echo $row["id"] ?>" width="50px"></a><br> <?php echo $row["name"]?><br> <?php echo $row["type"]?><br> <?php echo $row["sub_type"]?><br> <?php echo $row["price"]?><br> <a href="addToBasket.php?id=<?php echo $row["id"] ?>"><img src="../images/basket_plus.gif"></a><br><br> </div> </td>[/code]to cancel the inner elements reciving the event[code] function cancelBubble() { event.cancelBubble = true; }[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 No problem -- just remember that there may be cross-browsers differences in bubbling. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted January 26, 2007 Author Share Posted January 26, 2007 yes i read about the differences in the direction of bubbling, do you have any sugestions, this is a univerisity project thats basicaly just showing off asyncronouse data mining and stuff, but i would think in a real life situation i should have the understanding.thanks for any sugestions Quote Link to comment Share on other sites More sharing options...
fenway Posted January 26, 2007 Share Posted January 26, 2007 I don't remember how I dealt with the FF side of things. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.