Search Results

Search found 2 results on 1 pages for 'gleeb'.

Page 1/1 | 1 

  • Is it possible to use JavaScript inside handlebars.js template

    - by Gleeb
    The description says it all. How to put a JavaScript script inside handlebars template. I want to make a dynamic Paypal button for my website. <script type="text/x-mustache-template" id="product-item-thumbnail-template"> <h2>{{title}}</h2> <p>{{message}}</p> <p><a class="btn" href="#">View details &raquo;</a></p> <p><script src="resources/js-frameworks/[email protected]" data-button="buynow" data-name="My product" data-amount="1.00"></script></p> </script> But this produces an error because of the tag. it closes the template script and not the paypal script Thanks

    Read the article

  • How to run <script src= > tag from javascript

    - by Gleeb
    I am having some difficulties implementing Paypal buttons with backbone.js The problem is that the button is implemented in a script tag: <script src="paypal-button.min.js?merchant=YOUR_MERCHANT_ID" data-button="buynow" data-name="My product" data-amount="1.00"></script> which i cant run from Handlebars.js because the </script> tag is closing the handlebars <script> I cant use eval(), or i don't understand how i am supposed to do that with the . So there you have it. i am kind of stuck. I am out of ideas on how to implement this button with backbone.js the last resort is to ask the server to produce html pages with the script in them and then load them to the page. i am just refusing to believe that JavaScript has no way to take care of this. Please help. This question relates to another question i asked in this subject. Is it possible to use JavaScript inside handlebars.js template Thank you.

    Read the article

1