WXforum.net
May 23, 2013, 05:08:41 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6617  •  Posts: 178633  •  Topics: 18128
Please welcome TheMOX, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Putting Widgets On a Site  (Read 594 times)
0 Members and 1 Guest are viewing this topic.
Farmtalk
Fitzweather
Forecaster
*****
Offline Offline

Posts: 3517



WWW
« on: November 02, 2011, 06:56:03 PM »

How can I put something like a Wunderground sticker on my site? I copied and pasted the code to where I wanted it on the page, but it just shows up with the link.

Thanks Cool

--Farmtalk--
Logged

"Make it simple but significant"

Administrator- www.fitzweather.com
Administrator- www.triviacre.com
DougW
Forecaster
*****
Offline Offline

Posts: 351


WWW
« Reply #1 on: November 02, 2011, 07:28:45 PM »

I use i-frames like this: Local Stations. Help is here: w3schools.
 The code will not validate as is. After placing the code on your page run the page thru here: Validator. Be sure and check the 'source code' and 'clean up with html tidy' boxes and modify code as necessary.

*note: I don't work on a page that's live, rather a test page of some sort until I get everything working and in its proper place.
« Last Edit: November 02, 2011, 07:55:09 PM by DougW » Logged

Farmtalk
Fitzweather
Forecaster
*****
Offline Offline

Posts: 3517



WWW
« Reply #2 on: November 02, 2011, 07:33:17 PM »

How do you get those to show up there? Do you just copy it onto the actual webpage that you want it on?
Logged

"Make it simple but significant"

Administrator- www.fitzweather.com
Administrator- www.triviacre.com
DanS
Chiang Mai weather
Forecaster
*****
Online Online

Posts: 4301



WWW
« Reply #3 on: November 02, 2011, 08:33:43 PM »

You place your sticker code (like this except with your data instead of 'ICHIANGM4') in the section you want it displayed.
Code:
<a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=ICHIANGM4"><img src="http://banners.wunderground.com/cgi-bin/banner/ban/wxBanner?bannertype=pws250_both&weatherstationcount=ICHIANGM4" width="250" height="150" border="0" alt="Weather Underground PWS ICHIANGM4" /></a>

If you want your site visitor to return to your page instead of leaving if they open the widget then close it, insert  target="_blank" right after your WU ID at the beginning. Example for mine,   ...ID=ICHIANGM4"target="_blank"><img src....
« Last Edit: November 02, 2011, 08:40:58 PM by DanS » Logged

Dan ThaiWx website
WS-2310/2810 WUHU WinXP 24/7
Farmtalk
Fitzweather
Forecaster
*****
Offline Offline

Posts: 3517



WWW
« Reply #4 on: November 02, 2011, 08:41:10 PM »

Do I need to place the link on the design page or coding page?
Logged

"Make it simple but significant"

Administrator- www.fitzweather.com
Administrator- www.triviacre.com
Farmtalk
Fitzweather
Forecaster
*****
Offline Offline

Posts: 3517



WWW
« Reply #5 on: November 02, 2011, 08:42:55 PM »

I put it in the coding section and it worked! Thanks Dan!! Does this also work for NWS scripts?
Logged

"Make it simple but significant"

Administrator- www.fitzweather.com
Administrator- www.triviacre.com
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.073 seconds with 19 queries.