Question
Best practices for submitting CF data to an AJAX page?
Hi everyone,
I've got a project I'm working on for work and have hit a little problem.
I am extracting data from my database and then after each piece of data (just numbers, usually 10 chunks of numbers), I tack a "|" onto the end of each number. Then, I output the data to the page. Back on my AJAX enabled page, I get the "responseText" from that page, and then split it up using javascript and the pre-inserted "|".
This seems to work fine, but it is quite a bit more messy. Also, It would really, really be nice to be able to do sorting and various other operations on the data with javascript instead of having to rely on CF's icky code logic.
Can someone please enlighten me as to best practices for this type of thing? I get the suspicion that I'll probably be using XML somehow, but I'd your opinion.
Thanks!
I've got a project I'm working on for work and have hit a little problem.
I am extracting data from my database and then after each piece of data (just numbers, usually 10 chunks of numbers), I tack a "|" onto the end of each number. Then, I output the data to the page. Back on my AJAX enabled page, I get the "responseText" from that page, and then split it up using javascript and the pre-inserted "|".
This seems to work fine, but it is quite a bit more messy. Also, It would really, really be nice to be able to do sorting and various other operations on the data with javascript instead of having to rely on CF's icky code logic.
Can someone please enlighten me as to best practices for this type of thing? I get the suspicion that I'll probably be using XML somehow, but I'd your opinion.
Thanks!
