Jump to content

Recommended Posts

Posted

Hi

Can someone give me some pointers on the code required for custom widgets. I want to explore the options for adding information to a dashboard and for starters a London travel widget and London Weather widget.

I can get it to add website but I cant quite understand the code required for a Div widget. I watched the video on the wiki but it is a bit unclear in terms of the code he pastes into the URL section.

Any help appreciated!

Posted

Hi @Tel8oy

I have embedded a weather widget in an iframe 

https://widgets.iwindsurf.com/widgets/web/modelTable?spot_id=830&units_wind=mph&units_temp=F&type=extended&width=710&height=310&color=163770&name=London&activity=Windsurf&app=Hornbill

Messed around with the widget values for height, width, colour etc to get it to present well on a dashboard widget in Hornbill.

Screen Shot 2016-11-07 at 15.58.17.png

If that is any help?

Steve

Posted

Thanks thats great, any ideas about DIV?

for instance TFL offer this code for Tube status updates

<div style="width:260px"><script language="JavaScript" src="https://www.tfl.gov.uk/tfl/syndication/widgets/serviceboard/embeddable/serviceboard-iframe-stretchy.js"></script></div>

Posted

Its generally not a god idea to use the <div> option when embedding remote content. CORS will stop it from working.  IFRAME is the only way to go for this specific requirements. As @James Ainsworth suggested this is the URL you should use in an IFRAME. 

Gerry

 tfl.png

Posted

Thanks for the information guys

Is there a good example of when a DIV should be used? Just so I understand the difference. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...