Welcome Guest, Not a member yet? Register   Sign In
jquery post

How's that data look coming back, or supposed to look like. You should be echo json back from your controller. When you return json, you need to specify the 4th param 'json'.
$.post('url', {params}, function(data){}, 'json');

What do you see in firebug?

Exactly my need is,i am creating a form in that i displayed datas from database.
now i want to edit those values and update on database so i have to pass the id to controller and fetch the datas in that id and edit them and update.
what i have to use thereā€¦..
Can use any method without jquery...

Well, I have used jQuery as a lightweight cross-browser which is best JavaScript library that emphasizes with JavaScript and HTML. It also helpful to develop a large library of AJAX applications. Another thing is that it is a JavaScript library great programmers, which simplifies the development of Web 2.0 applications.

[quote author="meera" date="1286614687"]Ya,like this only,but i use this i am not getting any responce.[/quote]

I don't understand what exactly don't you get - controller don't get an id or post method don't alert data?

Of course if you want post function to alert data you must echo it in the controller function which you called in jQuery post. So in your example you called function editnew

so you function must look like this:

function editnew()
  //you code...

  echo 'some_data';

This is an example with string, but if you want some data structure then you can use json as someone said.

Theme © iAndrew 2016 - Forum software by © MyBB