Tel8oy Posted November 7, 2016 Share Posted November 7, 2016 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! Link to comment Share on other sites More sharing options...
Steven Boardman Posted November 7, 2016 Share Posted November 7, 2016 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. If that is any help? Steve Link to comment Share on other sites More sharing options...
Tel8oy Posted November 7, 2016 Author Share Posted November 7, 2016 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> Link to comment Share on other sites More sharing options...
James Ainsworth Posted November 7, 2016 Share Posted November 7, 2016 Hi @Tel8oy, Thanks for your post. I'll see what more I can find on the DIV option on the custom widgets. For the TFL Tube Status you can try using the IFRAME option with the URL https://www.tfl.gov.uk/tfl/syndication/feeds/serviceboard-fullscreen.htm Link to comment Share on other sites More sharing options...
Gerry Posted November 7, 2016 Share Posted November 7, 2016 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 Link to comment Share on other sites More sharing options...
Tel8oy Posted November 8, 2016 Author Share Posted November 8, 2016 Thanks for the information guys Is there a good example of when a DIV should be used? Just so I understand the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now