Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Why Safari does not trigger onclick event when clicked on empty table cell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why Safari does not trigger onclick event when clicked on empty table cell?



Safari doesn't seem to capture the onclick event when clicked inside the
table cell that has no contents in it.

<table border="1" cellpadding="0" cellspacing="0" height="300px"
width="300px">
<tr>
        <td height="300px" width="150px" onclick="alert('event captured
from first table cell')"></td>
        <td height="300px" width="150px" onclick="alert('event captured
from second table cell')">a<br>b</td>
</table>

In the above example, no matter where you click in the first <TD> the
event is not captured. In the second cell, if you click on the text,
onclick event is captured, but not when you click outside the text. Any
idea how to make Safari generate onclick event when user clicks on empty
cell?

Thanks,
Sudheer
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.