I'm relatively new at using Prototype ajax requests...and I'm having a difficult time figuring out the best way to "insert" data into the database and then return the inserted row's PK back to the original page. Can anyone help me out here? I'm developing using .Net.
This is an example of what I'm doing: var ajaxinsert = new Ajax.Request('insertNote.aspx', { method: 'get', parameters: 'text='+note.text+'&width='+note.rect.width +'&height='+note.rect.height+'&left='+note.rect.left +'&top='+note.rect.top+'&id='+note.id+'&status='+note.status, onSuccess: function(transport) { note.status = 'saved'; }, onFailure: function(transport) { note.status = 'failed'; } Basically I'm calling a page "inserNote.aspx" to do my insert into db. This works perfect so far...but I can't find a good way to retreive the PK of the row I just inserted! I've tried using Ajax.Updater but that doesn't seem to be a good method because I don't want to make two ajax calls...I just want to make the one request and retreive the inserted ID... I am very very very close to getting my project working. This is my last missing key! Please someone shed some light on how to do this best, thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---