I need to use ajax in confluence, but I have this wrong "Error occurred during template rendering: Encountered "{" at /decorators/main.vmd[line 368, column 12] Was expecting one of: "(" ... ... ... ... "##" ... "\\\\" ... "\\" ... ... "*#" ... "*#" ... ... ... ... ... ... ... ... ... ... "{" ... "}" ... . Contact your administrator for assistance."
the ajax code is:
fnSendDelete("TESTDATA");
function fnSendDelete(idx)
{
var postdata = {'index': idx};
AJS.$.ajax({
type: "post",
url: "http://URL",
data: postdata,
success: function() {
alert("ok");
},
error: function(response) {
alert("failed");
}
}); //ajax call
}
This code is OK, but doesn't work.
Please help. thanks
Try to avoid mixing javascript in with your velocity. Can you put it in a separate file and source it in? Otherwise you might have to escape your dollars.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.