I have requirement list of records are there in that each and every record i need to keep refresh button by clicking that each button ....it should take tha latest value from the database that too it should fetch individual column
By refreshing the button how to get the latest records from database byu using ajax
Collapse
X
-
Show some code.
For each button, call a generic piece of Javascript code which will take the row/column no. (or whatever can identify the piece of information that you need) and make an Ajax request. Using the response, it should be easy to update.
How this could be done will be more clear if you post some code. -
i have a for loop through which i am able to populate my database contents and display the results on individual rows of my table.
Now i want to refresh a particular row and not the entire table.I am giving a refresh button to each row ,onclick of which i want to refresh that particular row.
Is this posible in Ajax keeping in consideration that the all my rows are lying within the " for loop".
Thanks in Advance.Comment
-
Yes, it should be possible as long as you have the relevant code on the server side and you call it with the correct parameters. For example, the rowid could be a unique identifier for a record in the database which corresponds to the row that you're trying to refresh. If you pass that along to the script and the server-side script returns one row, you can use that to update the row.
Post your code.Comment
-
Check out the tutorials in the Offsite Links thread. They contain plenty of examples. If the unique rowid corresponds to the id in the table then the JSP code should be easy. As far as AJAX is concerned, see the examples and tutorials. If you get stuck, post your code here.Comment
Comment