Nov 21
I managed to make the Ajax.InPlaceEditor do some work for me. I had no idea what was wrong with my original approach until today, when I used Firebug to inspect the sent and returned values of my code. It was just then when I realised that there was no actual return value.
1 2 3 4 | <h1 id="test">Test value</h1> <script type="text/javascript"> new Ajax.InPlaceEditor('test', 'output.php',{callback: function(form, value) { return 'name=' + escape(value)}}); </script> |
The solution was easy, the return value of the InPlaceEditor’s method needed a bit altering:
And here is output.php
1 2 3 | $var = $_POST['name']; echo $var; ?> |
Easy ![]()