How do i write script in the <HEAD>

Posted by Community Admin on 03-Aug-2018 14:52

How do i write script in the <HEAD>

All Replies

Posted by Community Admin on 23-Nov-2010 00:00

I am trying integrate Google Checkout into my Site Finity 4.0 site. In order to do this I need to paste a bit of javascript into the <HEAD>. I tried using the "Script Widget" but this mucks up the extra attributres that Google requires. For example this script :

<script 
  id='googlecart-script' type='text/javascript'
  src='checkout.google.com/.../cart.js
  integration='jscart-wizard'
  post-cart-to-sandbox='false'
  currency='GBP'
  productWeightUnits='KG'>
</script>

becomes this :

<script 
   
type="text/javascript"
  
src="checkout.google.com/.../cart.js integration='jscart-wizard' post-cart-to-sandbox='false' currency='GBP' productWeightUnits='KG'">
</script>

which is close, but not close enough as it add double quotes around the lot. Hence, how can i inject some markup into the header where i get full control ? I am presuming i need to develop my own widget ?

Cheers
Mark

Posted by Community Admin on 24-Nov-2010 00:00

Hello Mark,

Thank you for using our services.

By using the GoogleCheckout link (checkout.google.com/.../cart.js integration='jscart-wizard' post-cart-to-sandbox='false' currency='GBP' productWeightUnits='KG') in path to the script using the script widget the code will be inserted in your page' head tag. Can you please take a look at the attached screen cast and verify that this is not what you are trying to achieve?

Greetings,
Radoslav Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed