JavaScript for Ajax in an Admin View #806
-
in an admin view for customers, I would like to get the coupon value after I entering the coupon (+ return) with ajax. I entered in the coupon field to get the value of the coupon after a return, an firing the controller... and in view footer I know, the ajax code is not even finished, since the result is not echoing in the coupon value field. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
just to close to this post: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
JRouter refers to a Javascript function that needs to be included in your view's footer (JS). It's a custom code llewellyn uses in his extensions (and i think most of us too) it should be there in "custom codes". If not try installing the demo package in JCB and it should appear in custom codes view.
Add the "[CUSTOMCODE=jsRouter]" tag to the Add JavaScript (view-footer) * field in your admin view under the "javascript" tab.
Then the code should work.