• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter and JQuery

#1
[eluser]Unknown[/eluser]
I'm creating a chat system using Codeigniter and I need to update a textarea with a field in the database each second.
For that I'm trying to use jquery for the timer but I don't know how I can update the textarea with data from the database, with a call from the jquery function.

Can you please help?

My thanks in advanced

#2
[eluser]Otemu[/eluser]
Hi,

To achieve something like this, you will need to use Ajax, quite a few tutorials so check them out:

http://net.tutsplus.com/tutorials/javasc...th-jquery/
http://www.sitepoint.com/ajax-jquery/
http://www.w3schools.com/jquery/jquery_ajax_intro.asp

Basically your timer will need to make an Ajax call, which will get the results from the database and update your textfield, looking at tutorials above should help you achieve this, if you have issues just post your code and we will do are best to try help



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.