cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jono
Champion Sweeper II
I would like to use the Accuweather widget (designed to include on a web page) as a custom widget. Is that possible? I don't know much at all about C# or how to make this work with the widget instructions on the LS site.

Here's the code from Accuweather:

<a href="http://www.accuweather.com/en/us/southfield-mi/48033/current-weather/20779_pc" class="aw-widget-legal"></a>
<div id="awtd1389381943971" class="aw-widget-36hour" data-locationkey="" data-unit="f" data-language="en-us" data-useip="true" data-uid="awtd1389381943971" data-editlocation="true"></div>
<script type="text/javascript" src="http://oap.accuweather.com/launch.js"></script>


Thanks,
Jono
4 REPLIES 4
Hemoco
Lansweeper Alumni
We're assuming you are using an older version of Internet Explorer.
Those always give us a headache.
Try adding an iframe widget and linking it to the widget's page:
http://[yoursitename]/WidgetsCustom/Weather2.aspx
Jono
Champion Sweeper II
Lansweeper wrote:
We're assuming you are using an older version of Internet Explorer.
Those always give us a headache.
Try adding an iframe widget and linking it to the widget's page:
http://[yoursitename]/WidgetsCustom/Weather2.aspx

I'm using Chrome 33. But I tried it in IE9 and Firefox 26 with the same results.

Just to make sure I understood correctly, here's what the code is for this widget:
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<% LS.User.Current().CheckWebsiteAccess(); %>
<div class="dragbox-content">
<a href="http://www.accuweather.com/en/us/southfield-mi/48033/current-weather/20779_pc" class="aw-widget-legal"></a>
<div id="awtd1389381943971" class="aw-widget-36hour" data-locationkey="" data-unit="f" data-language="en-us" data-useip="true" data-uid="awtd1389381943971" data-editlocation="true"></div>
<script type="text/javascript" src="http://oap.accuweather.com/launch.js"></script>
</div>

That's the entire code. Should there be something else in there? Any additional headers or footers needed?

I tried your suggestion and placed it in an iframe widget; that worked. This is good enough for me. My geeky side would like to figure out the original code, but it's not that important in the long run.

Thanks!
Jono
Champion Sweeper II
The widget is coming up blank for me.
Hemoco
Lansweeper Alumni
Easiest solution:

Make a file called weather.aspx and put it in C:\Program Files (x86)\Lansweeper\Website\WidgetsCustom, with the following content:

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<% LS.User.Current().CheckWebsiteAccess(); %>
<div class="dragbox-content">
<a href="http://www.accuweather.com/en/us/southfield-mi/48033/current-weather/20779_pc" class="aw-widget-legal"></a>
<div id="awtd1389381943971" class="aw-widget-36hour" data-locationkey="" data-unit="f" data-language="en-us" data-useip="true" data-uid="awtd1389381943971" data-editlocation="true"></div>
<script type="text/javascript" src="http://oap.accuweather.com/launch.js"></script>
</div>


Then go to the Configuration/Widgets/ page and add a non-editable widget with weather.aspx as the webpage. You'll have to do a page refresh (F5) to see the widget's content after dropping it on the webpage.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now