Javascript is the easiest way to get weather forecasts from yr.no on your home page.
Javascript is a script language that is very common on the web. Javascript also works on all web sites and in all browsers.
With Javascript forecasts from yr.no you can get a box containing the weather forecast on your web page that will automatically be updated with fresh data. The offer is completely free!
Here's how to do it:
- Find the city you want to notice, e.g. Skui (use the search field at the top of the page and search for the location you want). Choose the language you want the forecast in by clicking the flag up to the right.
- Click on "Free Weather Data" link at the bottom of the page, next to location name information. Click on "View Details" under the heading "Javascript Forecasts"
- Choose one of the four designs available. Copy EVERYTHING that is in the "Code" field just below the every example.
- Open the website you want to add the forecast to, in the software you normally use to create your web pages.
- Paste the code where you want the alert to appear. In order for the forecasts to work, you must paste the code directly into the HTML code. You can not paste the code as plain text in FrontPage or Dreamweaver.
- Save page.
Help
Dersom det dukkar opp ein tekst som ser om lag slik ut:
<script type=»text/javascript» src=»www.yr.no/sted/Norge/Akershus/Bærum/Skui/ekstern_boks_stripe.js»>
This means you have pasted the code as text and not as code. Look for places that say "edit code", "code", "edit html" or something similar, and paste the code.