Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1561 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Should i use Ajax?

Thread title: Should i use Ajax?
Closed Thread    
    Thread tools Search this thread Display Modes  
09-25-2005, 03:37 AM
#1
Dray is offline Dray
Dray's Avatar
Status: Request a custom title
Join date: Sep 2005
Location: Texas
Expertise:
Software:
 
Posts: 1,139
iTrader: 0 / 0%
 

Dray is on a distinguished road

  Old  Should i use Ajax?

Hi guys...

Should i use ajax for simple things as Shoutbox and Poll?

I'm still learning it using (xajax) and i thought that i always have to start from somewhere...so why not use Ajax to dynamically update the Poll once the user votes or Dynamically update the shoutbox.

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.

09-25-2005, 06:42 AM
#3
Dray is offline Dray
Dray's Avatar
Status: Request a custom title
Join date: Sep 2005
Location: Texas
Expertise:
Software:
 
Posts: 1,139
iTrader: 0 / 0%
 

Dray is on a distinguished road

  Old

Ya but everytime the user clicks on something...just set a cookie with the latest thing the user clicked and there ya go. Whats the best library to use?

09-25-2005, 06:57 AM
#4
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

not if you want to rememebr evry little querk the UI has changed... and when a user uses a bookmark you dont want to rely on cookies. If you do every bookmark he makes on your site will lead to the same page....

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed