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

  • demonmaestro
  • Gold Member
  • Gold Member
  • User avatar
  • Joined: Jun 21, 2006
  • Posts: 484
  • Loc: Conroe, Texas
  • Status: Offline

Post November 10th, 2011, 10:23 pm

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.
Thanks, Josh --DemonMaestro
www.LilNetwork.com
Fun Website www.ShoutsCloud.com
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 10th, 2011, 10:23 pm

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8925
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post November 10th, 2011, 10:26 pm

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.
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • demonmaestro
  • Gold Member
  • Gold Member
  • User avatar
  • Joined: Jun 21, 2006
  • Posts: 484
  • Loc: Conroe, Texas
  • Status: Offline

Post November 10th, 2011, 10:35 pm

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?
Thanks, Josh --DemonMaestro
www.LilNetwork.com
Fun Website www.ShoutsCloud.com
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8925
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post November 11th, 2011, 11:48 am

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.
Ozzu Hosting - Want your website on a fast server like Ozzu?

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 140 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.