david wrote:
> Sorry, I needed some more test, i did not use traditionnal event
> model:

I'm not sure I understood the code you sent.  Where does process() get
called?

I've put together a simple version of what I'm trying to do.  Code follows:

<html>
   <head>
      <title>Event Propagation</title>
      <script src="prototype.js" type="text/javascript"></script>

      <script type="text/javascript">

         function showPopup() {
            alert('popup');
         }

         function setRow() {
            alert('row');
         }

      </script>
   </head>

   <body>

      <div id='hoverdiv' style='display:none; position:absolute; top:
0; left:0;'></div>

      <div id='results'>
         <table border='1'>
            <thead>
               <tr>
                  <th>Column 1</th>
                  <th>Column 2</th>
                  <th>Column 3</th>
               </tr>
            </thead>
            <tbody>
               <tr onclick='showPopup(this, 1)'>
                  <td>Row 1-1</td>
                  <td>Row 1-2</td>
                  <td>
                     <div id='row-1'>
                        <a href='#' onclick='setRow()'>Row 1-3</a>
                     </div>
                  </td>
               </tr>
            </tbody>
         </table>
      </div>

   </body>
</html>


What I'm looking to do is fire showPopup() on a click inside the <tr>.
However, if the <a href> is clicked instead, I want setRow() to fire,
but not showPopup.

Both of those functions will have Ajax.Updater calls in them, but I left
them out for simplicity as I don't believe they have any bearing on this
problem.

I did some digging on stopPropagation and it looks like you can only use
that on event handlers?  How do I obtain a reference to the event handler?

Thanks for your help thus far!

> --
> david


-- 
---------------------------
Jason Frisvold
xenopha...@gmail.com
---------------------------
"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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to