View Single Post
09-25-2005, 06:25 AM
#2
GMMorris is offline GMMorris
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 45
iTrader: 0 / 0%
 

GMMorris is on a distinguished road

  Old

Hi Dray,

I'll guive you a little explanation as to why Ajax is Good\Bad and you can decide for your self.

What we use AJAX for in web applications is so we can save the state of the page but also be able to change the displayed data. What do I mean? Well if my page has something like a tree with hidden nodes and I dont want the nodes to close the moment the user chooses some data I have two choices- I can either save the state of each node (with PHP for example) and have that state set every time the page reloads, or I could use AJAX so that when the user clicks a node it will change the content of the Display area and then my tree wont change, because a Postback to server never actually occured.
Why is this good?
My UI dosnt get reset
Why is this bad?
Well, lets say my page has different content (for each node) and my user wants to bookmark that particular content, he wont be able to. Why? because as far as the browser is concerned this page is how it would be on the first load (it dosnt recognize AJAX) so if he bookmarked the page it will always display the page as though it has just loaded, without any of the AJAX events...

So to answer your question- to dynamicaly update a poll or shoutbox - Yes. Ajax would be suitable.