I have a table which always updates by clicking on another link. This link has ajax functionality which is created by serverside API at run time and JQuery has no control over this link.
Now whenever this link changes table, I want to call a function by JQuery, how do I do that?
Related
I have a jQuery Grid that loads the data on web API call, onclick of Edit button that is in each row of the grid, it takes the Id of the record and a jQuery dialog opens that loads a partialview that contains all the details of that record, On the dialog I Edit the data and Update the database. In the database the data are updated properly.But the grid Does not refresh after the dialog closes.
I have a dropdown also on the page that causes the filteration of data in the jQuery grid based on it's selection.It works fine always but after the dialog closes and On change of this dropdown list selection the request to the web API to load the grid with updated data does not go.
Once the update is successfull, try calling $('#id_of_the_grid').trigger('reloadGrid'); before you close the dialog.
I'm making a 'check_list' for my company. Each row of the table will be ONE event with 10+ check boxes that are labeled with the table header. Each time a check box is clicked I want to save that user's ID and Date. Is there a way to call a server side method to save this without submitting a form?
I just don't want to use a submit button because I need as much room as possible for check boxes.
I welcome any ideas or tips/tricks.
I am using Ruby on Rails.
Use jQuery, attach to the change event, and use ajax to call the method.
I have a proof-of-concept that is thoroughly and utterly broken here:
http://jsfiddle.net/floyd_may/FAmxj/
I'm hoping the intent behind this is evident. Basically, I want to use #editPage to edit elements on #mainPage one at a time. However, as soon as you click the 'Back to Main Page' button, the main page is empty.
Can I get some guidance here as to how to make this work?
Try using the pageinit event instead of pagebeforeshow: http://jsfiddle.net/FAmxj/11/
With pagebeforeshow, multiple models are bound to #mainpage.
I want to be able to call a method from a link click. The situation is I have a chat client within my website. When the user clicks on the Open Chat client link I want to fire off a method that updates all the contacts the user is allowed to talk to and than it fires off javascript to open the chat client.
Ive got the javascript to open the chat client firing but not the method before. All the method will do is update some database records that the chat client accesses (I only want to do this if they open the chat client otherwise it is overkill and an unneeded perf hit).
Thanks in advance
The easiest solution is to use jQuery (or any other js library) to make an ajax call to your action method. Depending on how your app works, you can make the call asyncrhonously, or wait for your method to respond before opening the chat window.
If using jQuery, the only line of js needed is:
$.get('/controller/method', function(response) { alert('db updated!') });
I'm trying to use the jquery UI dialog component to display a form; which I successfully did.
However I'm at lost on how to retrieve data to this form inside the dialog window. Is it possible? The example shown on jquery website only shows static messages.
Maybe you can tell us more about the problem. What data do you want do display and in which format is this data (is it form data, javascript objects, dom objects, etc.?)
You talked about a form which is shown via a dialog. Where do you want to access this form data (when the dialog is closed, opened, when the form is submitted, ...)?