The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

Script Problem! Generator messing up Home Page.

View previous topic View next topic Go down

Script Problem! Generator messing up Home Page.

Post by Chris Hickingbottom on September 30th 2010, 9:13 pm

Ok, so when I put my weather generator for a roleplay section of my site up a couple days ago, it worked just fine. Now it is messing up the home page by blending everything together.. and the second weather part is not showing up. Any suggestions??

<br><script type="text/javascript">
/* Weather Generator */
var d=new Date();
var class1='titlebg'; //the class for the top row of cells
var class2='catbg';//the class for the city name cells
var class3='windowbg'; // the class for the other cells
var ans ='day'; //write week for weekly, day for daily
//note: it is case sensitive
var week = Math.round(d.getTime()/(1000*60*60*24));
var week = Math.round(d.getTime()/(1000*60*60*24*7));
var weather=[
['Sunny','','Sunny. Great day outside today!'], //0
['Mostly Sunny','','Mostly Sunny'], //1
['Partly Cloudy','','Partly Cloudy'], //2
['Cloudy','','Its cloudy today. The sun just does not want to come out.'], //3
['Light Rain','','Its only lightly raining today. Much like a drizzle; it is quite peaceful.'], //4
['Rainy','','Its definitely wet outside. A great day for the crops.'], //5
['Heavy Rain','','It will be pouring outside today. You might want to stay inside.'], //6
['Thunderstorm','','Its bad outside. The wind is blowing hard and the rain is coming down even harder. Thunder and lightning come along with this.'], //7
['Windy','','Its sunny outside, but really windy.'], //8
['Icy Rain','','Its very cold outside and to top it all off, its raining.'], //9
['Clear Night','','The night is clear. the moon is definitely visible, depending on its phase.'], //10
['Few clouds at night','','The night is just a little cloudy. You can still see the moon, depending on its phase.'], //11
['Mostly Cloudy Night','','The night sky is covered with the clouds. The moon is not going to be visible in any phase.'], //12
['Night Rain','','Its raining tonight. If you are inside a building, it is quite relaxing to hear the beat of it upon the roof.'], //13
['Heavy Rain Night','','Its pouring down outside tonight. You can barely see in-front-of yourself.'], //14
['Night Thunderstorm','http,://','Its storming outside tonight. The wind is blowing hard and the lightning and thunder are not too friendly.'] //15
var cities=[
['Interminable World-Fall-Daytime',60,81,0,15,1,15,2,15,3,15,4,8,5,8,6,8,7,8,8,8],
['Interminable World-Fall-Nightime',35,61,10,20,11,20,12,20,13,13,14,13,15,13]
var f=new Array();
function PickTemperature(x){
document.write(cities[x][1]+m + 'F or ');
document.write(Math.round((cities[x][1]+m-32)*(5/9)) + 'C');
else if(p!=0 & p!=2 & p%2==0){
function PickWeather(x){
document.write('</td><td ="'+class3+'" align="center"> <img src="');
var z=2,L=0;
document.write(weather[cities[x][z-1]][1] + '" />');
document.write(' </td><td class="windowbg" align="center"> ' + weather[cities[x][z-1]][2] + ' </td></tr>');
document.write('<table width="670"><tr><td class="'+class1+'" align="center"><h2>Region-Season-Time</h2></td><td class="'+class1+'" align="center"><h2>Temperature</h2></td><td class="'+class1+'" align="center"><h2>Weather</h2></td><td class="'+class1+'" align="center"><h2>Weather Statistics</h2></td></tr>');
document.write('<tr><td ="'+class2+'" height="30px" align="center">');
document.write('</td><td class="'+class3+'" height="30px" align="center"> ');

Chris Hickingbottom

Posts : 25
Reputation : 0
Language : English

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum