JavaScript HTML - VWS AllTags JS Version 1.2
No server side scripting required!
» Download VWS AllTags Template [zip]
» Download Imperial Only Template [zip]
» Download Metric Only Template [zip]
» Download VWS AllTags Bandwidth Saver Templates [zip]
Preparing your Virtual Weather Station software to publish the JS AllTags file:
1. Download and unzip the vwsalltags.htx file of your choice.
2. Copy the vwsalltags.htx file to your /vws/templates folder.
3. Open your VWS program and go to [Internet][HTML Settings] from the menu bar.
4. Click [Browse] on an empty Template row and select the vwsalltags.htx file in your /vws/templates folder.
5. Click [Browse] on the HTML Filename row next to the selected vwsalltags.htx template file and select your web server upload folder and create a new file called vwsalltags.js. If you don't have an upload folder already, simply publish the file anywhere you want and set FTP Sent (Upload) File accordingly. Make sure the created vwsalltags.js file will be uploaded to your web server.
Preparing your web pages to show the published data of the JS AllTags file:
6. Open your web page in any html editor or text editor and add the following line of code in the html header (between the <head>...</head> tags) of your page to include the vwsalltags.js file (replace [path] with your path to this file, e.g. /folder/subfolder or delete if the file is in your root):
<script language="JavaScript" src="[path]/vwsalltags.js"></script>
7. Depending which VWS AllTags template you use (Imperial, Metric, both) you can add the following variables (tags) to your html page (between the <body>...</body> tags) to view the according VWS value. Replace xxXXX with the corresponding VWS vxxXXX tag without leading v. Add a leading z for Imperial values or a leading c for Metric values. Have a look into the vwsalltags.htx template for a tag reference:
| For Imperial values: |
<script>document.write(zxxXXX)</script> |
| For Metric values: |
<script>document.write(cxxXXX)</script> |
Example:
<p>Temperature: <script>document.write(zxv007)</script>°F (<script>document.write(cxv007)</script>°C)<br>
Wind Speed: <script>document.write(zxv002)</script>mph (<script>document.write(cxv002)</script>km/h)</p>
8. To keep the bandwidth and download time to a minimum I recommend using the Bandwidth Saver version of JS AllTags. You have to inlcude both files (will be faster than one big one) like #6.
|