it looks like you are using the classname instead of the object ID. normally the $() function is fer getting a reference to a obejct by its ID.
$(".rowclick") shouldn't this be $("row_1_4_2009_abc") On Sun, Mar 13, 2011 at 3:29 PM, Jake Churchill <reyna...@gmail.com> wrote: > > Look into jQuery's .each() method. It helps in loopin over things like > that > > -Jake > > Sent from my Droid > On Mar 13, 2011 9:51 AM, "fun and learning" <funandlrnn...@gmail.com> > wrote: > > > > Hi All - I am trying to get the following working. It seemed to work > initially, but somehow it stopped working > > > > I have a row like below > > > > <tr id="row_1_4_2009_abc" class="rowclick"> > > <td></td> > > </tr> > > > > I am using jquery to get the id on click of a row: > > > > $(".rowclick").click(function() { > > var row_id = $(this).attr("id"); > > var getAttributes = row_id.split("_"); > > var setCommonAttr = getAttributes[1] + "_" + getAttributes[2] + "_" + > getAttributes[3] + "_" + getAttributes[4]; > > var new_row_id = document.getElementById("new_row_" + > setCommonAttr).value; > > }); > > > > Can anyone let me know what is wrong with the above code. Tried different > options but with no success > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342962 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm