Hi,
I don't know why but all the time I'm getting error: "Error rendering macro 'currentdate' : Error occurred rendering template content"
This is my code:
## @param Name:title=Name|type=string|required=true|desc=Your name <script type="javascript> AJS.$.ajax({ url: URL_WITH_NO_QUOTES, type: "GET", contentType: "application/json", success: function(msg){ alert(msg); } }); </script>
what I'm doing wrong here?
Community moderators have prevented the ability to post new answers.
Hi,
I suppose $ is treated as a special character used by Velocity template. So, you need to escape it.
I hope the following code will work.
## @param Name:title=Name|type=string|required=true|desc=Your name #set($D='$') <script type="text/javascript"> AJS.${D}.ajax({ url: URL_WITH_NO_QUOTES, type: "GET", contentType: "application/json", success: function(msg){ alert(msg); } }); </script>
Besides, <script type="javascript>
in your code should be quoted properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.