Injecting a response value into a textarea to subsequently post

Posted by Ashbyrich on Stack Overflow See other posts from Stack Overflow or by Ashbyrich
Published on 2010-03-25T09:46:54Z Indexed on 2010/03/25 9:53 UTC
Read the original article Hit count: 284

Filed under:

I have multiple notes with class=.note and unique id each inside a div.

On click of edit I grab the id, show hidden form #noteditor and hide all notes.

I am using the load function to get the response (using codeigniter so url does work) and input result in the editorfrorm Textarea id = upnote...

Firebug response looks ok and I have tried to inject into a div and this works fine, BUT getting this injto the text area is causing me some headaches.

There is also the chance that i am going around this a convoluted way due to my limited knowledge...

Any help or pointers v much appreciated...

$(document).ready(function() {

$('.edit').click(function(e){
var v=$(this).attr("id");

$(".note").slideUp();
$("#noteditor").slideDown('1000');

$("#upnote" ).load('/notes/my_note/'+v);




e.preventDefault();
});

© Stack Overflow or respective owner

Related posts about jQuery