How do i embed a skyscanner javascript on to a wordpress post ?

Discussion in 'Programming' started by PNV, Mar 29, 2012.

  1. #1
    Hi everyone,

    I am trying to embed a skyscanner search widget on to a wordpress post (not the sidebar).
    i have posted a copy of the code below minus the URLs (which arent allowed in the thread)

    Any thoughts on how i can make this work ?



    <script type="text/javascript" src="url"></script> <script type="text/javascript"> skyscanner.load('snippets','2'); function main(){ var snippet=new skyscanner.snippets.SearchPanelControl(); snippet.setCurrency('EUR'); snippet.setShape('box300x250'); snippet.setDeparture('nl'); snippet.draw(document.getElementById('snippet_searchpanel')); } skyscanner.setOnLoadCallback(main); </script> <div id="snippet_searchpanel" style="width: auto; height:auto;"> <!-- Please do not remove this line. It is necessary for proper functionality of Skyscanner Snippet and is also required by terms and conditions of service --> <a href="url" target="_blank">Cheap Flights from Netherlands</a> </div>
     
    Last edited: Mar 29, 2012
    PNV, Mar 29, 2012 IP
  2. PNV

    PNV Active Member

    Messages:
    70
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Never mind, I figured it out.

    I had to put the <script type="text/javascript" src="url"></script> in the header.php


     
    PNV, Mar 29, 2012 IP