Thanks a bunch for the post!

I actually found that earlier today and have been playing with it. Let
me note what I've found and maybe we can compare ideas and help each
other out here.

First of all, I got my update button to register a click using this
code:

  $(":button.ajaxUpdate")
        .livequery('click', function() {

And, when I click on the row with this code:

  $("tr")
        .livequery('click',function() {
                alert($(this).html());
        });

it displays the new html of the row. However, when I reference the row
in the button:ajaxTable function, it registers no html at all. I'm
guessing the key is to somehow get the html in the row to act as if it
was actually there before the jQuery call. I feel like there should be
some way to do this right after the ajax call. As far as I can tell,
livequery rebinds an object to a function so that it can be used
again. I'm not sure if it can be used to "re-use" new DOM elements.
Perhaps jQuery contains a function that can be used with livequery to
see current code?

In any case, thanks for the link...hopefully you can figure this out
as well!

Ben


On Nov 6, 10:18 pm, idealists <[EMAIL PROTECTED]> wrote:
> I think this plugin will help do it:http://docs.jquery.com/Plugins/livequery
>
> Infact im trying to get this to do something similar for me, but
> having trouble,
> Hope that helps.
>
> Ben wrote:
> > Hi all! I have a question regarding the ability to access content
> > produced by an AJAX request.
>
> > I have a simple tabular row:
>
> > <tr id='1'><td id='first_name'>Ben</td><td id='last_name'>Ross</
> > td><td><input type='button' class='edit' value='Edit'</td></tr>
>
> > I use jquery to obtain the id's of each td when the "Edit" button is
> > pressed, send them off to a php script. The php script queries the
> > database, returns the values of the row relating to the id given by
> > the row id, and replaces the row with the following html:
>
> > <td id='first_name'><input type='text' name='Ben'></td><td
> > id='last_name'><input type='text' name='Ross'></td><td><input
> > type='button' class='update' value='Update'</td>
>
> > The update button is rebound using Live Query, meaning that clicking
> > the button is recognized. However, I cannot find a way to access the
> > new td id's or input values returned via the php script and ajax. Does
> > anyone have any idea on how to re-bind the new td tags to the page or
> > how to access them?
>
> > Any and all help is greatly appreciated!

Reply via email to