I'm not sure if this calls for a redesign, or if this is valid behavior.
I have a table with an onClick action on the <tr> tags. Normally, I
want this behavior to fire every time a row is clicked with one
exception. Within the <tr> is an <a href> that triggers a different
behavior on a click. At the moment, both behaviors fire simultaneously,
both completing as they should. What I'd like to do is prevent the <tr>
onclick from firing when I've specifically clicked on the <a href>. Is
this possible?
The code looks like this (using PHP smarty) :
<tr onclick='showPopup(this, {$row.id});' >
<td>{$row.vendor}</td>
<td>
<div id='trust-{$row.id}'>
<img src='images/icon_thumbsup.gif' style='border: none'
onclick='setTrust(1, {$row.id}, {$row.trust});' />
{$row.trust}
<img src='images/icon_thumbsdown.gif' style='border: none'
onclick='setTrust(0, {$row.id}, {$row.trust});' />
</div>
</td>
</tr>
Both onclick functions are essentially ajax.updater functions with some
scriptaculous effects thrown in for good measure.
Thanks,
--
---------------------------
Jason Frisvold
[email protected]
---------------------------
"I love deadlines. I like the whooshing sound they make as they fly by."
- Douglas Adams
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---