[jQuery] Re: Ajax results?

2009-10-02 Thread Toaster
Thanks guys Michael, that link is very helpful. I got the numbers a bit mixed up, it should be around 25 result items each made up of 12 elements with around 12 pieces of information from db/json. - so yes, 300 elements total. If you don't mind me asking, I'd like you guys to give me your opinio

[jQuery] Re: Ajax results?

2009-09-30 Thread Michael Geary
25 x 12 sounds closer to 300 elements? Either way, it's easy to generate that much stuff in JavaScript and get good performance, if you're careful about how you write the code. Here's a post with some tips and optimized code for a similar task: http://groups.google.com/group/jquery-en/msg/121203c4

[jQuery] Re: Ajax results?

2009-09-30 Thread James
I can't really say. It varies depending on what you're trying to put in and how you're doing it. For example, inserting 120 large tables versus 120 lines of text will probably have a noticeable difference. And how you're doing it. For example, inserting everything at once, or set a timeout to inse

[jQuery] Re: Ajax results?

2009-09-30 Thread Toaster
Thank you for your reply James In regards to the JSON vs HTML, would the browser have any problems creating 25 results items each with 12 pieces of information from JSON? (it'd be more of less 120 elements being appended)

[jQuery] Re: Ajax results?

2009-09-29 Thread James
You should use JSON if you have a set of data that you want to easily parse (e.g. loop through) and put into a format of your own (via Javascript). You should use HTML if you have a block of HTML to just insert into the page, or if you just return very short and simple data, like "true" or "false"