html code
-
I am trying to insert a travel widget from skyscanner with a code they provided but nothing is showing up. I put in the html section, but when I preview it is blank. This is the code.
<script type=’text/javascript’ src=’//api.skyscanner.net/api.ashx?key=’></script>
<script type=’text/javascript’>
skyscanner.load(‘snippets’,’2′);
function main(){
var snippet = new skyscanner.snippets.SearchPanelControl();
snippet.setShape(‘box400x400’);
snippet.setCulture(‘en-GB’);
snippet.setCurrency(‘USD’);
snippet.setProduct(‘flights’,’1′);
snippet.setProduct(‘hotels’,’2′);
snippet.setProduct(‘carhire’,’3′);snippet.draw(document.getElementById(‘snippet_searchpanel’));
}
skyscanner.setOnLoadCallback(main);
</script>
<div id=’snippet_searchpanel’ style=’width: auto; height:auto;’></div>The blog I need help with is: (visible only to logged in users)
-
That code won’t work on WordPress.com because it’s using JavaScript. Do they have a non-JavaScript version available?
Users are not allowed to post JavaScript on WordPress.com blogs. JavaScript can be used for malicious purposes. As an example, JavaScript has taken sites such as MySpace.com and LiveJournal offline in the past. The security of all WordPress.com blogs is a top priority for us, and until we can guarantee scripting languages will not be harmful, they will not be permitted.
JavaScript from trusted partners, such as YouTube and Google Video, is converted into a WordPress shortcode when a post is saved.
More on what code is supported at WordPress.com:
https://en.support.wordpress.com/code/
- The topic ‘html code’ is closed to new replies.