No, I got the style change to work,did just what you had (thanks for
the time to write the code, though)...

When I click the row, I ALSO want to fire off the cfajax to populate
an area of my page.

Chad


On 7/22/05, Steve Onnis <[EMAIL PROTECTED]> wrote:
> Why dont you just write it yourself?
> 
> seriously?
> 
> <style>
>         .rowOn {
>                 cursor:pointer;
>                 background-color:yellow;
>                 }
>         .rowOff {
>                 cursor:pointer;
>                 background-color:green;
>                 }
> </style>
> <script>
>         function switchClass() {
>                 var obj = arguments[0];
>                 obj.className = obj.className == arguments[1] ? arguments[2] :
> arguments[1];
>                 }
> </script>
> <table>
>         <tr class="rowOff" onclick="switchClass(this, 'rowOn', 'rowOff');">
>                 <td>hello</td>
>         </tr>
> </table>
> 
> by the time you try and work out whats going on with the CFAjax stuff you
> could do it on your own
> 
> Steve
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Chad
> Renando
> Sent: Friday, July 22, 2005 6:14 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] RE: CFAjax - firing from a tr
> 
> 
> Thanks for the reply, Steve.  It's an App, so I am just worrying about
> IE and Firefox, and I can trigger functions from TRs in both.  Am
> currently changing the style based on click.
> 
> Not real up on the whole DOM thing.  I am wanting to pass a value to
> the function through an argument.  One work around I though was to
> have a select list and populate it from the onClick in the tr, then
> have the Ajax function reference that select list, but that feels
> messy even to describe.
> 
> So instead of referencing the value of the form field below:
> <select id="mySelectVar" name="mySelectVar" onChange="myAjaxCall()">
> function myAjaxCall()
>         {
>                 var myVariable = DWRUtil.getValue("mySelectVar");
>                 DWREngine._execute(_cfscriptLocation, null, 'doStuff', 
> myVariable ,
> otherFunction);
>         }
> 
> Would rather just reference a variable in the function call:
> <tr onClick="myAjaxCall(#variables.MyVarToPass#)">
> function myAjaxCall(returnVar)
>         {
>                 var myVariable = returnVar;
>                 DWREngine._execute(_cfscriptLocation, null, 'doStuff', 
> myVariable ,
> otherFunction);
>         }
> 
> But I hear there's issues with this?
> 
> Thanks for expending the brainwaves.
> 
> Chad
> 
> 
> On 7/22/05, Steve Onnis <[EMAIL PROTECTED]> wrote:
> > Chad
> >
> > The thing you have to realise is that each element has different
> properties
> > so it would depend on what your actually wanting to do with the tr.  also,
> > in the DOM, i believe that tr does not have an onClick method, but some
> > browsers support it
> >
> > Steve
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Chad
> > Renando
> > Sent: Friday, July 22, 2005 4:16 PM
> > To: CFAussie Mailing List
> > Subject: [cfaussie] CFAjax - firing from a tr
> >
> >
> > Hey all.  For those of you remotely familiar with the cfajax project
> > or ajax in general...
> >
> > The examples they show are fired with a select or input form field.
> > What would need to change in order to fire from an onclick in a <tr>?
> >
> > Thanks!
> >
> > Chad
> > who hopes he got this in in time to be answered before the weekend.
> >
> > ---
> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> > [EMAIL PROTECTED]
> > Aussie Macromedia Developers: http://lists.daemon.com.au/
> >
> >
> >
> > ---
> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to
> [EMAIL PROTECTED]
> > Aussie Macromedia Developers: http://lists.daemon.com.au/
> >
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to