Datatables + fancybox - Reload on specific conditons?
Datatables + fancybox - Reload on specific conditons?
I am loading data into datatables from a DB via AJAX. There are bunch of columns and it's not possible to view them all at the same time in any sane way. So In one of my columns I have a link that opens an iframe (with tabbed content) to view or edit the full record. For that I'm using fancybox. What I'd like to do is have datatables reload *only* if I update the record (hit an update button in the iframe). Via the fancybox onclose function I was able to cause a reload everytime the iframe is closed but I don't see a way to pass a variable to it to say only refresh if update=true. Maybe I can do something on the datatables side?
Before I went off and spent a lot of time lot of time researching this and trying to figure it out on my own I was wondering if anyone might have some ideas to point me in th right direction and help save me some time?
Before I went off and spent a lot of time lot of time researching this and trying to figure it out on my own I was wondering if anyone might have some ideas to point me in th right direction and help save me some time?
This discussion has been closed.
Replies
Allan
fnReloadAjax was exactly what I needed. I created a function to call from an onsubmit on my iframe that closes francybox then calls it. Super fast! Much better than reloading the whole page.
Thanks for the help. I love datatables.