Page 1 of 1

Syntax error

Posted: Thu Nov 14, 2019 8:29 pm
by Billywiz
I hope someone can help. I cannot get the code below to work in Internet explorer even though it works in all the other browsers.
I get the script error message showing that this is a problem https://widgets.skyscanner.net/widget-s ... /loader.js
on further investigation I am told it is a syntax error, can anyone spot it ?

Code: Select all

<div
  data-skyscanner-widget="FlightSearchWidget"
  data-locale="en-GB"
  data-market="GB"
  data-currency="GBP"
  data-colour="000000"
  data-button-colour="#006699"
  data-button-font-colour="#ffffff"
  data-flight-button-text="Search Flights"
  data-powered-by-size="0"
  data-powered-by-logo-colour="light"
  data-widget-scale="1"
  data-flight-type="one way"
  data-multi-city-max-flights-number="6">
  </div>
<script src="https://widgets.skyscanner.net/widget-server/js/loader.js" async></script>
Cheers

Re: Syntax error

Posted: Thu Nov 14, 2019 9:03 pm
by WWBman
I have no idea but the > after the "6" looks lonely!!?

Re: Syntax error

Posted: Thu Nov 14, 2019 11:48 pm
by crispy68
I dont think there is anything wrong with the code. It looks to me it doesnt work on IE11. If you go to the page where you got the code from even it doesnt work in IE11.

Re: Syntax error

Posted: Fri Nov 15, 2019 3:29 am
by BaconFries
I have no idea but the > after the "6" looks lonely!!?
Hmmm doesn't anyone 🔍👓 see it?. WWBman you are the closest😉!. Look at the opening <div at the start it hasn't been closed properly it should be <div> then the contents (code) then </div>

Code: Select all

<div>
  data-skyscanner-widget="FlightSearchWidget"
  data-locale="en-GB"
  data-market="GB"
  data-currency="GBP"
  data-colour="000000"
  data-button-colour="#006699"
  data-button-font-colour="#ffffff"
  data-flight-button-text="Search Flights"
  data-powered-by-size="0"
  data-powered-by-logo-colour="light"
  data-widget-scale="1"
  data-flight-type="one way"
  data-multi-city-max-flights-number="6"
  </div>
The then stray > as mentioned by WWBman removed/deleted. It should then maybe work... but as in your previous post answered by Pablo it simply may not work in IE11 as the code may only be for modern browsers.

Re: Syntax error

Posted: Fri Nov 15, 2019 3:39 am
by crispy68
The div does have end tag after the 6". All the data tags are supposed to be within the div tag like such:

<div data-skyscanner-widget="FlightSearchWidget data-locale="en-GB"......etc......data-multi-city-max-flights-number="6"></div>

Re: Syntax error

Posted: Fri Nov 15, 2019 2:06 pm
by Billywiz
Thanks for the input guys, waiting for skyscanner to get back to me.

Cheers