|
Mailing Lists
|
Home /
Groups /
Ajax
Updating AJAX Grid from other form submit
I have a ajax grid that is calling a cfc onLoad. Currently, it is displaying the title and author of a book list.Joel Watson 07/10/07 09:58 A If I understand your need correctly I may be able to provide an example ofTodd 07/15/07 02:35 P I have a ajax grid that is calling a cfc onLoad. Currently, it is displaying the title and author of a book list. I have another form that is bound to the grid, populating itself with all 20 book columns from the selection in the grid. At the present, I have successfully been able to pass the arguments of the fully populated form to my BookUpdate function. However, in order for the results to display in the ajax grid, I have to reload the grid. Is there any way, say with an onclick event of the updating form, to recall the cfc that is populating the ajax grid after the BookUpdate function has completed? Thanks for everyone's help on this. If I understand your need correctly I may be able to provide an example of what we do in a similar situation. We create one JavaScript "callback" function to build a grid based on an Array of Objects which we loop through and prepend/replace the child element of the grid record by record. We then create two remote CFC functions to populate the grid(both return an Array of Identical Structures). One CFC function returns an array of all the records while another "update" function only returns an array of 1 element (just the last created record). Both "on page load" and "on form submit" events can call the same callback function. When the page loads it will prepend everything cuz nothing exists yet. When the form is submitted it will loop only 1 time (cuz only 1 array index is returned) and if the element already exists it will replaceChild otherwise it will add a new record to the grid. (oh yeah, we determine if the element exists by giving each grid element a DOM ID based on the identity of the record in the database). Hope that helps, -Todd I have a ajax grid that is calling a cfc onLoad. Currently, it is displaying the title and author of a book list. I have another form that is bound to the grid, populating itself with all 20 book columns from the selection in the grid. At the present, I have successfully been able to pass the arguments of the fully populated form to my BookUpdate function. However, in order for the results to display in the ajax grid, I have to reload the grid. Is there any way, say with an onclick event of the updating form, to recall the cfc that is populating the ajax grid after the BookUpdate function has completed? Thanks for everyone's help on this.
|
May 19, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||