Best way to add hidden values to cell?
Best way to add hidden values to cell?
soroushhakami
Posts: 10Questions: 0Answers: 0
Scenario: I am sending function_name and function_id via AJAX. The function_name is displayed in a column. When a function_name-cell is clicked, I want to to fire off a javascript with the function_id value. What is the best way to achieve this?
A thought I had was to add it to aoColumns as seen below, and make it invisible somehow. But this seems overly complicated, and it would still technically be two different cells. Is there some way to send some hidden parameter data to each cell perhaps?
Big thanks in advance
[code]
"aoColumns": [
{ "mDataProp": "function_name" }
{ "mDataProp": "function_id" }
]
[/code]
A thought I had was to add it to aoColumns as seen below, and make it invisible somehow. But this seems overly complicated, and it would still technically be two different cells. Is there some way to send some hidden parameter data to each cell perhaps?
Big thanks in advance
[code]
"aoColumns": [
{ "mDataProp": "function_name" }
{ "mDataProp": "function_id" }
]
[/code]
This discussion has been closed.
Replies
http://api.jquery.com/data/
Allan