Skip to content
Advertisement

Submitting data via Ajax in X-Editable

I am trying to submit data via Ajax using X-Editable and having trouble with running the php script defined in url parameter. Actually, I got basic example from working:

Html:

JavaScript

Js:

JavaScript

And this is working (post.php is executed). But now I want to have more editable fields and to run them on button click. This is my html (I am using Smarty):

JavaScript

And related Javascript:

JavaScript

The thing is that this creates editable fields as it should, but it doesn’t call post.php script (unlike in the first example). What I am doing wrong?

Advertisement

Answer

I have solved it by doing the following:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement