Monday 15 February 2010

Jquery and document.write not playing nice -


I have a JavaScript that needs to be loaded on the "completion" page of the ecommerce site, here's the code: < / P>

  & lt; Script type = "text / javascript" & gt; Var skulist = "", pricelist = "", quantitylist = ""; (Var i = 0; i & lt; command description length; i ++) {skulist = order description [i] [2] + "," + skullist; Pricelist = Order Details [I] [5] + "," + pricelist; Volume list = order details [i] [6] + "," + volume list; } SkulistLen = skulist.length; Skulist = skulist.slice (0, skulistLen-1); PricelistLen = pricelist.length; Pricelist = pricelist.slice (0, preclist-lan-1); QuantitylistLen = quantitylist.length; Quantitylist = Quantity Seal Seal (0, Volume List Lane-1); Document.write ("& lt; iframe height = '1' width = '1' frameborder = '0' scrolling = 'no' src = 'https: //www.emjcd.com/tags/c?containTagId = 49296 and ITEM1 = "+ Skulist +" & amp; AMT1 = "+ pricelist +" & amp; QTY1 = "+ volume list +" and CID = 10000171 and OID = $ (order no) and type = 362565438 and do = USD 'Name =' cj_conversion '& gt; & lt; / iframe & gt; "); & Lt; / Script & gt;   

And I have to call it with jquery ... (for other reasons) - and I am doing this like this:

  Lt; Div id = "cj placeholder" & gt; & Lt ;! - Placeholder - & gt; & Lt; / Div & gt; & Lt; Script & gt; If ($. Cookie ("too-affiliate")) {$ () Ready (function () {// Load external file // $ ('# cj-placeholder') .load ('/ v / js / cj .html', function () {// return; $ .get (' /v / js / cj.html ') .vivet (data) {$ (' # cj-placeholder ') .html (data);}}}}}}}} other {$ (' # cj- placeholder Annexure ('.');}   

The problem is, when I do this, I only get a blank page with the contents of the script (inside the CSLL) - Instead of putting it on it, instead of replacing an order ending page ... searching here, I found out that If a document is called written such as after the page it is full, it will change it, as is the problem .... What do I do?

simply app

  $ ('body'). ("& Lt; iframe height = '1' width = '1' frameborder = '0' scrolling = 'no' src = 'https: //www.emjcd.com/tags/c?containTagId = 49296 and ITEM1 = "+ + schoolist +" & amp; AMT1 = "+ Proscolic +" and QTY1 = "+ quantitylist +" & amp; CID = 10,000,171 & amp; OID = $ (OrderNo) & amp; Self-Examination PE = 362565438 and Currency = USD 'name =' CG_Conversion '& gt; & Lt; / Iframe & gt; ");    

No comments:

Post a Comment