More in this section

Forums / General Discussions / How do i write script in the <HEAD>

How do i write script in the &lt;HEAD&gt;

2 posts, 0 answered
  1. Mark
    Mark avatar
    19 posts
    Registered:
    10 Nov 2008
    23 Nov 2010
    Link to this post
    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='https://checkout.google.com/seller/gsc/v2_2/cart.js?mid=??????????????'
      integration='jscart-wizard'
      post-cart-to-sandbox='false'
      currency='GBP'
      productWeightUnits='KG'>
    </script>

    becomes this :

    <script 
       
    type="text/javascript"
      
    src="https://checkout.google.com/seller/gsc/v2_2/cart.js?mid=???????' 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
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    24 Nov 2010
    Link to this post
    Hello Mark,

    Thank you for using our services.

    By using the GoogleCheckout link (https://checkout.google.com/seller/gsc/v2_2/cart.js?mid=???????' 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
2 posts, 0 answered