Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

External Component not able to access AEM library

umeshj24393
Level 4
Level 4

Hi,

We have upgraded our CQ v 5.5 to AEM 6.2 SP1.

There is external component in sidekick in which we are using js script to target URL  to load in our AEM Page.

We are using AEM library in our js script like jquery,shared.js etc.

The main problem is that script is not able to use AEM library like jquery,shared.js etc.

It was fine working with CQ 5.5 version.

is this due to Security Reason that script is not able to access in AEM library?

Any Suggestion?

Thanks in advance

3 Replies
smacdonald2008
Level 10
Level 10

In more recent versions of AEM, there have been modifcations. For example, if you attempt to perform AJAX call to an AEM Servlet, you need to use AEM Version of JQuery. Can you be more specific and show a code example of what exactly you are trying to do.

umeshj24393
Level 4
Level 4

Hi,


Steps:

1. I drag the external Component from sidekick .

2.  Enter the template URL in external Component

3. In console, I get the following error window.jQuery is not function.

The script is not able to use aem jquery library, cq.shared library.

Attaching script:

<style>section{display:block}.iv_hidden{display:none}#iv_e_a_1{position:absolute;z-index:99;top:0;left:10px;padding:10px}#iv_e_a_1 #iv_e_a_2{background-color:#fff;border:solid #ccc 1px;vertical-align:middle;text-align:center;padding:10px;box-shadow:5px 5px 5px #888;cursor:pointer}section>div input[type=text],section input[type=password]{width:340px}section>div input[type=button]{cursor:pointer}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-dialog{position:absolute;top:0;left:0;padding:0;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:0 solid #ddd;background:#eee 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #888;background:#888 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:alpha(opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:alpha(opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:alpha(opacity=35)}.ui-icon{width:16px;height:16px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:0}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:0}.ui-widget-overlay{background:#666 50% 50% repeat;opacity:.5;filter:alpha(opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 50% 50% repeat-x;opacity:.2;filter:alpha(opacity=20);border-radius:5px}.ui-dialog-titlebar-close{visibility:hidden!important} </style> <noscript> <style> .eventregistration { display: none; } </style> </noscript> <noscript> <h1 style="color: red;">JavaScript must be enabled in your browser to register for this event.</h1> </noscript> <script> IV = window.IV || {}; IV.Sell = IV.Sell || {}; IV.Sell.Domain = "sell.myl.ms:443"; </script> <script>typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n <10?"0"+n:n}function o(n){return u.lastIndex=0,u.test(n)?'"'+n.replace(u,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function e(i,r){var s,l,h,a,v=n,c,u=r[i];u&&typeof u=="object"&&typeof u.toJSON=="function"&&(u=u.toJSON(i));typeof t=="function"&&(u=t.call(r,i,u));switch(typeof u){case"string":return o(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(n+=f,c=[],Object.prototype.toString.apply(u)==="[object Array]"){for(a=u.length,s=0;s <a;s+=1)c[s]=e(s,u)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s <a;s+=1)typeof t[s]=="string"&&(l=t[s],h=e(l,u),h&&c.push(o(l)+(n?": ":":")+h));else for(l in u)Object.prototype.hasOwnProperty.call(u,l)&&(h=e(l,u),h&&c.push(o(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var r,u,n,f,s,t;typeof JSON.stringify!="function"&&(u=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(i,r,u){var o;if(n="",f="",typeof u=="number")for(o=0;o <u;o+=1)f+=" ";else typeof u=="string"&&(f=u);if(t=r,r&&typeof r!="function"&&(typeof r!="object"||typeof r.length!="number"))throw new Error("JSON.stringify");return e("",{"":i})});typeof JSON.parse!="function"&&(r=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),r.lastIndex=0,r.test(text)&&(text=text.replace(r,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}(),function(){var t,i,u,n,r;window.jQuery().dialog||window.jQuery.getScript("https://code.jquery.com/ui/1.8.16/jquery-ui.min.js"),function(){var n,t;n={};this.template=t=function(i,r){var u;return u=/\W/.test(i)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+i.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"window.jQuery1\r").replace(/\t=(.*?)%>/g,"',window.jQuery1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[i]=n[i]||t(document.getElementById(i).innerHTML),r?u(r):u}}();u=function(n){var i,t;return n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search),t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))};Number.prototype.money=function(n,t,i){var u,r,f,e;return f=this,n=isNaN(n=Math.abs(n))?2:n,t=t===undefined?".":t,i=i===undefined?",":i,e=f <0?"-":"",u=parseInt(f=Math.abs(+f||0).toFixed(n))+"",r=(r=u.length)>3?r%3:0,e+(r?u.substr(0,r)+i:"")+u.substr(r).replace(/(\d{3})(?=\d)/g,"window.jQuery1"+i)+(n?t+Math.abs(f-u).toFixed(n).slice(2):"")};String.prototype.replaceAll=function(n,t,i){var r,u,f;if(r=void 0,u=void 0,f=void 0,f=void 0,u=this+"",r=-1,typeof n=="string")if(i)for(f=n.toLowerCase();(r=u.toLowerCase().indexOf(n,r>=0?r+t.length:0))!==-1;)u=u.substring(0,r)+t+u.substring(r+n.length);else return this.split(n).join(t);return u};window.jQuery.fn.replaceHtml=function(n,t,i){return this.each(function(){var u,r,f,e;if(u=void 0,r=void 0,f=void 0,e=void 0,r=this.firstChild,e=void 0,u=void 0,f=[],r)for(;;)if(r.nodeType===3&&(e=r.nodeValue,u=e.replace(n,t),u!==e&&(!i&&/ </.test(u)?(window.jQuery(r).before(u),f.push(r)):r.nodeValue=u)),!(r=r.nextSibling))break;f.length&&window.jQuery(f).remove()})};t=!1;n=!1;i="385px";IV.Sell.Data={AccountId:window.CQMicrositeRoot.split("/")[window.CQMicrositeRoot.split("/").length-1],ConnectUrl:window.connectServerUrl,ScoId:u("sco-id"),UserId:((r=window.CQ.User)!=null?typeof r.getUserID=="function"?r.getUserID():void 0:void 0)||window.CQ.shared.User.data.userID};window.jQuery.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8",dataType:"jsonp",type:"post"});window.jQuery(document).ready(function(){return parseInt(IV.Sell.Data.ScoId)>0?(IV.Sell.RegAction=window.jQuery("#eventReg, #regLoginForm").attr("action"),window.jQuery("body").find("*").replaceHtml(/{{price}}/gi," <span class='iv_price' />").replaceHtml(/\[\[price\]\]/gi," <span class='iv_price' />"),IV.Sell.GetPrice(),IV.Sell.Configuration()):IV.Sell.GetRegistration()});IV.Sell.SubmitForm=function(){return window.jQuery("form").submit()};IV.Sell.GetRegistration=function(){return window.jQuery.ajax({url:"https://"+IV.Sell.Domain+"/registration/getregistration",data:IV.Sell.Data,jsonpCallback:"IV.Sell.GetRegistrationResult"})};IV.Sell.GetRegistrationResult=function(n){if(window.jQuery("#connect-event-leftnav").append(" <li> <span> <a href='#' class='iv-configure'>Configure IV Sell<\/a><\/span><\/li>").find(".iv-configure").click(function(){return IV.Sell.ShowRegistration(n)}),n){if(IV.Sell.Registration=n,n.PaypalUsername===null)return IV.Sell.ShowRegistration(n)}else return IV.Sell.ShowRegistration(n)};IV.Sell.ShowRegistration=function(t){var r;return r=window.jQuery(template("iv_e_c",t)).dialog({closeOnEscape:!0,draggable:!1,modal:!0,resizable:!1,title:"Registration",width:i,zIndex:9999,open:function(i){window.jQuery(i.target).find("input[value='Cancel']").click(function(){return r.dialog("destroy")});n&&window.jQuery(i.target).find("#iv_e_c_a").hide().find("input").val(IV.Sell.Data.Password);window.jQuery(i.target).find("#iv_e_c_x").on("keypress",function(n){if(n.which===13)return window.jQuery(this).closest(".ui-dialog").find("#iv_e_c_y").focus()});window.jQuery(i.target).find("#iv_e_c_y").on("keypress",function(n){if(n.which===13)return window.jQuery(this).closest(".ui-dialog").find("#iv_e_c_u").focus()});window.jQuery(i.target).find("#iv_e_c_u").on("keypress",function(n){if(n.which===13)return window.jQuery(this).closest(".ui-dialog").find("#iv_e_c_p").focus()});window.jQuery(i.target).find("#iv_e_c_p").on("keypress",function(n){if(n.which===13)return window.jQuery(this).closest(".ui-dialog").find("#iv_e_c_s").focus()});window.jQuery(i.target).find("#iv_e_c_s").on("keypress",function(n){if(n.which===13)return window.jQuery(this).closest(".ui-dialog").find("input[value='Save']").click()});return window.jQuery(i.target).find("input[value='Save']").click(function(){var u,f,e,i,o,s;return n||(IV.Sell.Data.Password=window.jQuery(this).closest(".ui-dialog").find("#iv_e_c_x").val()),i=window.jQuery(this).closest(".ui-dialog"),o=i.find("#iv_e_c_x").val(),s=i.find("#iv_e_c_y").val(),e=i.find("#iv_e_c_u").val(),u=i.find("#iv_e_c_p").val(),f=i.find("#iv_e_c_s").val(),t={password:o,serialKey:s,apiUsername:e,apiPassword:u,apiSignature:f,serviceData:IV.Sell.Data},t={registrationUpdate:JSON.stringify(t)},window.jQuery.ajax({url:"https://"+IV.Sell.Domain+"/registration/setregistration",data:t,jsonpCallback:"IV.Sell.SetRegistrationResult"}),r.dialog("destroy")})}})};IV.Sell.SetRegistrationResult=function(t){return t?(n=!0,alert("Configuration has been saved!")):alert("There is an issue with your configuration.\nPlease try again or contact support.")};IV.Sell.GetPrice=function(){return window.jQuery(".iv_price").html(""),window.jQuery.ajax({url:"https://"+IV.Sell.Domain+"/configuration/getprice",data:IV.Sell.Data,jsonpCallback:"IV.Sell.GetPriceResult"})};IV.Sell.GetPriceResult=function(n){if(n!==null){IV.Sell.Product=n;IV.Sell.SetPrice(n.Price,n.PriceFormat);IV.Sell.SetRegistrationFormAction(n.Price);try{if(n.Price>0)return IV.Sell.SetPurchaseButton(n.PurchaseButtonName)}catch(t){}}};IV.Sell.SetPrice=function(n,t){if(n>0)return window.jQuery(".iv_price").html(""+t)};IV.Sell.SetPurchaseButton=function(n){try{return window.jQuery("#submitRegistrationFormLink .centerBtnImg div, [onclick='javascript:regLoginSubmit();'] .centerBtnImg div").html(n)}catch(t){return window.jQuery("#submitRegistrationFormLink .centerBtnImg div").html("Purchase")}};IV.Sell.SetRegistrationFormAction=function(n){if(window.jQuery("#eventReg, #regLoginForm").is("form")&&(window.jQuery("#eventReg, #regLoginForm").attr("action",IV.Sell.RegAction).find("#submitRegistrationFormLink .centerBtnImg div").html("Submit"),n>0))return window.jQuery("input:hidden[name='connectUrl']").remove(),window.jQuery("#eventReg, #regLoginForm").attr("action","https://"+IV.Sell.Domain+"/paypal").append(" <input type='hidden' name='connectUrl' value='"+IV.Sell.Data.ConnectUrl+"'/>").append(" <input type='hidden' name='accountId' value='"+IV.Sell.Data.AccountId+"'/>").append(" <input type='hidden' name='referrer' value='"+window.location.href+"'/>").find("#submitRegistrationFormLink div:contains('Submit')").html("Purchase")};IV.Sell.Configuration=function(){return window.jQuery.ajax({url:"https://"+IV.Sell.Domain+"/configuration/getconfiguration",data:IV.Sell.Data,jsonpCallback:"IV.Sell.ConfigurationResult"})};IV.Sell.ConfigurationResult=function(n){return IV.Sell.Configuration=n,n&&!t?IV.Sell.SetAdmin(n):void 0};IV.Sell.ShowConfiguration=function(){var r,t;return t={Product:IV.Sell.Product,Configuration:IV.Sell.Configuration},r=window.jQuery(template("iv_e_b",t)).dialog({closeOnEscape:!0,draggable:!1,modal:!0,resizable:!1,title:"Configure this event for sale",width:i,zIndex:100,open:function(i){n&&window.jQuery(i.target).find("#iv_e_b_a").hide().find("input").val(IV.Sell.Data.Password);window.jQuery(i.target).find("#iv_e_b_x").on("keypress",function(n){if(n.which===13)return window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_p").focus()});window.jQuery(i.target).find("#iv_e_b_p").val(IV.Sell.Product.PriceFormat).on("keypress",function(n){if(n.which===13){if(window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_p").val().length>0&&window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_x").val().length>0)return window.jQuery(this).closest(".ui-dialog").find("input[value='Save']").click();if(window.jQuery(n.target).closest(".ui-dialog").find("#iv_e_b_x").val().length===0)return window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_x").focus()}});return window.jQuery(i.target).find("#iv_e_b_c").val(IV.Sell.Product.CurrencyCode),window.jQuery(i.target).find("#iv_e_b_n").val(IV.Sell.Product.PurchaseButtonName),window.jQuery(i.target).find("input[value='Save']").click(function(){var i,u,f;return f=window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_p").val().replaceAll("$","").replaceAll(",",""),u=window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_n").val(),i=window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_c").val(),(IV.Sell.Product===null||IV.Sell.Product===void 0)&&(IV.Sell.Product={}),IV.Sell.Product.Price=f,IV.Sell.Product.PurchaseButtonName=u,IV.Sell.Product.CurrencyCode=i,n||(IV.Sell.Data.Password=window.jQuery(this).closest(".ui-dialog").find("#iv_e_b_x").val()),t={ServiceData:IV.Sell.Data,Product:IV.Sell.Product,Configuration:IV.Sell.Configuration},t={configurationUpdate:JSON.stringify(t)},IV.Sell.Data.Password!=null?(window.jQuery.ajax({url:"https://"+IV.Sell.Domain+"/configuration/setconfiguration",data:t,jsonpCallback:"IV.Sell.SetConfigurationResult"}),r.dialog("destroy")):void 0}),window.jQuery("input[value='Cancel']").click(function(){return r.dialog("destroy")})}})};IV.Sell.SetAdmin=function(n){var i,r;if(t=!0,n&&n.IsAdmin){window.jQuery("#iv_e_a_1").remove();r=window.jQuery(template("iv_e_a",!0)).hide();window.jQuery("body").append(r.fadeIn(1e3));i=null;window.jQuery("#iv_e_a_2").click(function(){return window.jQuery().dialog?(i&&clearInterval(i),IV.Sell.ShowConfiguration()):(i&&clearInterval(i),i=setInterval(function(){if(window.jQuery().dialog)return clearInterval(i),IV.Sell.ShowConfiguration()},50))});return window.jQuery("body").on("keypress",function(n){if(n.which===67&n.shiftKey&n.ctrlKey)return window.jQuery("#iv_e_a_2").click()})}};IV.Sell.SetConfigurationResult=function(t){if(t)return n=!0,IV.Sell.GetPrice()}}.call(this) </script> <script type="text/template" id="iv_e_a"> <div id="iv_e_a_1"> <span id="iv_e_a_2"> Configure </span> </div> </script> <script type="text/template" id="iv_e_b"> <div id="iv_e_b_1"> <section id="iv_e_b_a"> <label>  password: </label> <div> <input type="password" id="iv_e_b_x" /> </div> </section> <section> <label> Event pricing: </label> <div> <input type="text" id="iv_e_b_p" value=" <%=(Product == null)?'0.00':Product.PriceFormat%>" /> </div> </section> <section> <label> Currency Code: </label> <div> <select id="iv_e_b_c"> <option value="USD">USD - US Dollar</option> <option value="CAD">CAD - Canadian Dollar</option> </select> </div> </section> <section> <label> Purchase button: </label> <div> <input type="text" id="iv_e_b_n" value=" <%=(Product == null)?'0.00':Product.PurchaseButtonName%>" /> </div> </section> <hr/> <div> <input type="button" value="Save" /> <input type="button" value="Cancel" /> </div> </div> </script> <script type="text/template" id="iv_e_c"> <div> <section id="iv_e_c_a"> <label>  Password: </label> <div> <input type="password" id="iv_e_c_x" value="" /> </div> </section> <section> <label> Serial Key: </label> <div> <input type="text" id="iv_e_c_y" value=" <%=SerialKey%>" /> </div> </section> <br/> <section> <label> Api Username: </label> <div> <input type="text" id="iv_e_c_u" value=" <%=PaypalUsername%>" /> </div> </section> <section> <label> Api Password: </label> <div> <input type="password" id="iv_e_c_p" value=" <%=PaypalPassword%>" /> </div> </section> <section> <label> Api Signature: </label> <div> <input type="text" id="iv_e_c_s" value=" <%=PaypalSignature%>" /> </div> </section> <hr/> <div> <input type="button" value="Save" /> <input type="button" value="Cancel" /> </div> </div> </script>

smacdonald2008
Level 10
Level 10

Can you package up your code into an AEM package that includes your component and put into a GOOGLE DRIVE and post that here - this script is not readable as is.