Hello there,
I have two DIV blocks on my page, one is a list of matched data records list (only a few fields each row) using <ol><li>, the other is detail record info when a record in above list is clicked. I want to use jQuery to update the content in the Block 2 whenever a record is clicked, without refreshing the whole page.
Block 1
========================================
1. Record #1 |
2. Record #2 |
... |
========================================
Block 2
========================================
field 1: |
field 2: |
......... |
========================================
Here is the question:
A query was executed to create the list of records, and all records are already returned to View, How can I store all matched data records and pass the clicked one to jQuery functions? Otherwise I have to pass the record id to controller via ajax and execute another query and return it back to Block 2 every time a record row is clicked. This seems to be very inefficient.
Any suggestion is appreciated.
Lio