Charles,
If you're planning to deploy this app in IE, you may have an issue. My
experience with IE is that adding/removing <tr> doesn't always work well.
:-(
What is most likely happening is that your button is inside a form. It
turns out that there's a race condition where sometimes the XmlHttpRequest
will get fired first and sometimes the form will be submitted first.
Lemme see if I can do something fancy with returning false from the button
ajax request to the event doesn't bubble up.
Thanks,
David
On Mon, Dec 1, 2008 at 1:08 PM, Charles F. Munat <[EMAIL PROTECTED]> wrote:
>
> I have a table in which each row represents an object in the database,
> with each cell in the row an input bound to an attribute of the object.
> I want to be able to add rows (with new, blank objects) and delete rows
> (deleting both the row on the page and the associated object in the
> database).
>
> I've set up a snippet method to insert a new row. It returns the table
> row with all the inputs nicely bound. How do I call this with AJAX and
> insert the NodeSeq into the current table?
>
> At the end of the row I have a [-] ajaxButton. It should delete that row
> and the associated object using AJAX, but when I click it, the page
> reloads and nothing changes.
>
> I've looked through the jQuery Lift stuff. Am I using the ajaxButton
> wrong? Why would the page reload? And what methods are appropriate to
> both updating an object (Model.remove(obj)) and deleting the row
> ($('#rowid').remove())?
>
> Any help appreciated.
>
> Chas.
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" 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/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---