Hello, I tried to edit in place with javascript as first but it didn't work.(Then i will import ajax). All codes here (basic). function Wrt(a,b) { document.getElementById(b).onclick = Edit(b); document.getElementById(b).innerHTML = a; } function Edit(idd) { var Now = document.getElementById(idd).innerHTML; document.getElementById(idd).onclick = function() { void(0) }; var txt = '<textarea id="text_box" onblur="return Wrt(this.value,'+ idd +')">'+Now+'</textarea>'; document.getElementById(idd).innerHTML = txt; document.getElementById('text_box').focus(); } Code (markup): <a href="#" id="1" onclick="Edit(this.id)">Text 1</a> <a href="#" id="2" onclick="Edit(this.id)">Text 2</a> Code (markup): It works but when I tried second time(edit that place) , it is not working.
Hello, I solved this problem I changed document.getElementById(b).onclick = Edit(b); with document.getElementById(b).onclick = function() { Edit(this.id); }