Would I use AJAX or jQuery to update page from a database?

  • demonmaestro
  • Gold Member
  • Gold Member
  • User avatar
  • Posts: 660
  • Loc: Conroe, Texas

Post 3+ Months Ago

New quick question. Is it ajax or jquery that say forinstance i have a field that i type in and hit send and it sends it to the database and shows on the screen

type info -> "same screen" send -> server -> display what was typed onto screen

like on how "crapbook" facebook you type in the "wall" and hit enter it shows on the screen your message?

im not to sure on how to explain it.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9086
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

That would be making an AJAX call to the server. Basically JavaScript on the page would communicate with the server and then update the contents on the page without actually reloading the page.

jQuery has built in functions to handle AJAX, so using jQuery would probably be easier.
  • demonmaestro
  • Gold Member
  • Gold Member
  • User avatar
  • Posts: 660
  • Loc: Conroe, Texas

Post 3+ Months Ago

so either one would work?
also i am going through and reading on how ajax works and i see on how ajax requires a input inorder for it to communicate with the server. theres no way for it to auto communicate with the sever? or is that too much load on the server?
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9086
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

jQuery is JavaScript, it just has a huge library of functions to make things easier. So yes, either could work.

I think it could communicate with the server without someone actually hitting a submit button, I haven't tried that. As far as load, it would just depend on how much work your serverside script does, and how often you call it. There is always potential for creating alot of load on the server if you do things not efficiently.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 106 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.