views:

2585

answers:

1

I have been looking for a really good, well documented jquery plug-in that will let me edit values on click of another button. This plugin is the closest yet, However I am not sure how to get it to save, even in testing. Something really quick that returns the value.

I am using this for my php script:

function editprofile()
     {

     $this->input->post('value');
       }

This is my JS script:

$("a.edit").live('click', function(){

        $(this).parent("li").find("span.detail").editable('profile/editprofile', 
     {
         indicator : 'Saving...',
         submit  : 'OK',
         tooltip   : 'Click to edit...'
     });



   });

This is my HTML:

<span id="city" class="detail">Philadelphia</span>
     <a href="javascript:;" class="edit">Edit</a>

Fixed: php should be:

echo $this->input->post('value');
+1  A: 
voyager
The first 2 links are the 2 I found, I am using the first one, and the tutorial leaves out the part I am not sure how to do, which is the php aspect.
matthewb
You are right, kinda hurried there.
voyager
I think I got it: forgot one wordon my php function echo $this->input->post('value');
matthewb
That's it. I thought there were some code you were showing.
voyager
Right, I am just working on client side server side is beyond my knowledge, I have another developer who I work with who does all of that, I am just getting the data preped to be sent correctly. Thanks.Now if only I can figure out how to call the change with a link. But that's another question.
matthewb