Jump to content

make the web as a world clock


dianzishangwu
 Share

Recommended Posts

I'm working on one task about making a website(well..not really a website cauze just client-side.that's just for practing javascript) as a world clock which means visitor a selection list of cities around the world. When the user selects a city, that cities current local time, monthly average temperature and monthly average rainfall are displayed. In order to encourage visitors to use their website as a type of world clock, I also need to provide a way to allow the visitor to set a city as their default city. When the visitor then returns to the Cities Around the World page, the visitor’s selected default city’s information will automatically be displayed. So I created three pages(index.html/ main.html/ top.html). The index.html page is a frameset page and I want to create five functions(function createCityInfo()/ function selectCity()/ function readDefaultCity()/ function writeDefaultCity()/ function setDefaultCity()/ ). The main page is one of the frame which contains all the data(Time Zones/ Average Temperature (°C)/ Average Rainfall (mm)) So I need to insert code to dynamically write the code based on selectd city in main.html page, thus I can retrieve data to show the visitor you know. And last page is the top.html which contains all the city names. So does anyone has this kind of javascript ability or experience to show me codes to achieve that goal. We can just talk about two cities at the moment..all I want to learn or know is the functions and other stuff. cheers

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...