Click to See Complete Forum and Search --> : fotter in to a .js file


Jupac
08-02-2003, 10:48 PM
can someone help me out this footer code in to a .js file

Khalid Ali
08-02-2003, 10:51 PM
help you out with what?????
you should explain briefly the problem + errors you are getting to be the least...

Jupac
08-03-2003, 03:56 PM
Sorry the problem is it saids Expected ';'

Jupac
08-03-2003, 03:58 PM
add i put ; at the end of each line on doucment.write

Charles
08-03-2003, 04:56 PM
The semi-colons at the end of the line are optional, you only need them if you put two lines of code on the same line of the file. You are getting that error message because the interpreter has parsed what looks like a full line of code and found more on the same line.

AdamBrill
08-03-2003, 05:22 PM
The problem would be in this line:document.write('<SELECT style="width:100px;font:10px verdana, arial, sans-serif;text-decoration:none;background-color:#00cccc; color:red;" name=url onchange="javascript:if( options[selectedIndex].value != 'Teams') document.location = options[selectedIndex].value">'); You need to backslash out the ' around the Teams. The correct code would be as follows:document.write('<SELECT style="width:100px;font:10px verdana, arial, sans-serif;text-decoration:none;background-color:#00cccc; color:red;" name=url onchange="javascript:if( options[selectedIndex].value != \\'Teams\\') document.location = options[selectedIndex].value">');

Jupac
08-04-2003, 03:02 PM
Hi adam u where right it was that line but the error thing pop-up says line 15 undetermaned string constance

AdamBrill
08-04-2003, 03:12 PM
My guess is it is because the forums adds a space into the javascript... In this part:

onchange="java script:if( options[selectedIndex].value != \'Teams\') document.location = options[selectedIndex].value">

take the space out of the javascript

Charles
08-04-2003, 03:28 PM
Originally posted by AdamBrill
My guess is it is because the forums adds a space into the javascript... In this part:

onchange="java script:if( options[selectedIndex].value != \'Teams\') document.location = options[selectedIndex].value">

take the space out of the javascript Or better yet, remove the "javascript:" all together. It's an error to have it there in the first place, though it's an error that most every browser simply ignores.

Jupac
08-04-2003, 08:14 PM
i tried wat u guys told me and there no error but nothings shows

AdamBrill
08-04-2003, 10:04 PM
Try this:document.write('<center>');
document.write('<table cellpadding="1" cellspacing="0" border="0"><tr bgcolor=#00cccc><script src="http://www.angelfire.com/la3/jt490250/banner.js"></script\></tr></table>');


document.write('<style>.globalNavLink {font-family:Arial; font-size:10px; font-style:normal; font-weight:bold; text-decoration:none; color:red;}.globalNavVline {color:red;font-family:Arial;font-size:12px;font-style:normal;font-weight:bold;}</style>');
document.write('<table cellpadding="1" cellspacing="0" border="0" bgcolor="#00cccc" width="468">');
document.write('<form action method="GET" style="margin:0">');
document.write('<tr>');
document.write('<td valign="center"><a class="globalNavLink" href="http://www.nba.com" target="_parent">NBA</a></td>');
document.write('<td class="globalNavVline">|</td>');
document.write('<td align="center"><a class="globalNavLink" href="http://www.wnba.com/" target="_parent">WNBA</a></td>');
document.write('<td class="globalNavVline">|</td>');
document.write('<td><a class="globalNavLink" href="http://www.geocities.com/jt490250/index_sparks.html" target="_parent"> My Sparks Site</a></td>');
document.write('<td>');
document.write('<SELECT style="width:100px;font:10px verdana, arial, sans-serif;text-decoration:none;background-color:#00cccc; color:red;" name=url onchange="if( options[selectedIndex].value != \'Teams\') document.location = options[selectedIndex].value">');
document.write('<OPTION selected>Teams</OPTION>');
document.write('<OPTION value="http://www.nba.com/hawks/">Atlanta</OPTION>');
document.write('<OPTION value="http://www.nba.com/celtics/">Boston</OPTION>');
document.write('<OPTION value="http://www.nba.com/bulls/">Chicago</OPTION>');
document.write('<OPTION value="http://www.nba.com/cavs/">Cleveland</OPTION>');
document.write('<OPTION value="http://www.nba.com/mavericks/">Dallas</OPTION>');
document.write('<OPTION value="http://www.nba.com/nuggets/">Denver</OPTION>');
document.write('<OPTION value="http://www.nba.com/pistons/">Detroit</OPTION>');
document.write('<OPTION value="http://www.nba.com/warriors/">Golden State</OPTION>');
document.write('<OPTION value="http://www.nba.com/rockets/">Houston</OPTION>');
document.write('<OPTION value="http://www.nba.com/pacers/">Indiana</OPTION>');
document.write('<OPTION value="http://www.nba.com/clippers/">LA Clippers</OPTION>');
document.write('<OPTION value="http://www.nba.com/lakers/">LA Lakers</OPTION>');
document.write('<OPTION value="http://www.nba.com/grizzlies/">Memphis</OPTION>');
document.write('<OPTION value="http://www.nba.com/heat/">Miami</OPTION>');
document.write('<OPTION value="http://www.nba.com/bucks/">Milwaukee</OPTION>');
document.write('<OPTION value="http://www.nba.com/timberwolves/">Minnesota</OPTION>');
document.write('<OPTION value="http://www.nba.com/nets/">New Jersey</OPTION>');
document.write('<OPTION value="http://www.nba.com/hornets/">New Orleans</OPTION>');
document.write('<OPTION value="http://www.nba.com/knicks/">New York</OPTION>');
document.write('<OPTION value="http://www.nba.com/magic/">Orlando</OPTION>');
document.write('<OPTION value="http://www.nba.com/sixers/">Philadelphia</OPTION>');
document.write('<OPTION value="http://www.nba.com/suns/">Phoenix</OPTION>');
document.write('<OPTION value="http://www.nba.com/blazers/">Portland</OPTION>');
document.write('<OPTION value="http://www.nba.com/kings/">Sacramento</OPTION>');
document.write('<OPTION value="http://www.nba.com/spurs/">San Antonio</OPTION>');
document.write('<OPTION value="http://www.nba.com/sonics/">Seattle</OPTION>');
document.write('<OPTION value="http://www.nba.com/raptors/">Toronto</OPTION>');
document.write('<OPTION value="http://www.nba.com/jazz/">Utah</OPTION>');
document.write('<OPTION value="http://www.nba.com/wizards/">Washington</OPTION>');
document.write('</SELECT>');
document.write('</td>');
document.write('<td width="10">');
document.write('<td><a class="globalNavLink" href="http://www.geocities.com/jt490250/login.html" target="_parent">Login</a>');
document.write('<td class="globalNavVline">|');
document.write('<td><a class="globalNavLink" href="http://www.geocities.com/jt490250/signup.html" target="_parent">Sign-Up</a>');
document.write('<td class="globalNavVline">|');
document.write('<td><a class="globalNavLink" href="/tickets/tickets.html" target="_parent">Alfetc</a>');
document.write('<td class="globalNavVline">|');
document.write('<td><a class="globalNavLink" href="/help/faq.html" target="_parent">Chat</a>');
document.write('</form>');
document.write('</table>');

document.write('<table><td bgcolor=#00cccc><font size=1 color=red><script src="http://www.angelfire.com/la3/jt490250/copy.js"></script\></font></td></table>');
document.write('</center>');

Jupac
08-05-2003, 02:16 PM
The error is still on line 15 expxed ')'

AdamBrill
08-05-2003, 04:13 PM
Ok, try this:document.write('<center>');
document.write('<table cellpadding="1" cellspacing="0" border="0"><tr bgcolor=#00cccc><script src="http://www.angelfire.com/la3/jt490250/banner.js"></script\></tr></table>');


document.write('<style>.globalNavLink {font-family:Arial; font-size:10px; font-style:normal; font-weight:bold; text-decoration:none; color:red;}.globalNavVline {color:red;font-family:Arial;font-size:12px;font-style:normal;font-weight:bold;}</style>');
document.write('<table cellpadding="1" cellspacing="0" border="0" bgcolor="#00cccc" width="468">');
document.write('<form action method="GET" style="margin:0">');
document.write('<tr>');
document.write('<td valign="center"><a class="globalNavLink" href="http://www.nba.com" target="_parent">NBA</a></td>');
document.write('<td class="globalNavVline">|</td>');
document.write('<td align="center"><a class="globalNavLink" href="http://www.wnba.com/" target="_parent">WNBA</a></td>');
document.write('<td class="globalNavVline">|</td>');
document.write('<td><a class="globalNavLink" href="http://www.geocities.com/jt490250/index_sparks.html" target="_parent"> My Sparks Site</a></td>');
document.write('<td>');
document.write('<SELECT style="width:100px;font:10px verdana, arial, sans-serif;text-decoration:none;background-color:#00cccc; color:red;" name=url onchange="if( options[selectedIndex].value != \\'Teams\\') document.location = options[selectedIndex].value">');
document.write('<OPTION selected>Teams</OPTION>');
document.write('<OPTION value="http://www.nba.com/hawks/">Atlanta</OPTION>');
document.write('<OPTION value="http://www.nba.com/celtics/">Boston</OPTION>');
document.write('<OPTION value="http://www.nba.com/bulls/">Chicago</OPTION>');
document.write('<OPTION value="http://www.nba.com/cavs/">Cleveland</OPTION>');
document.write('<OPTION value="http://www.nba.com/mavericks/">Dallas</OPTION>');
document.write('<OPTION value="http://www.nba.com/nuggets/">Denver</OPTION>');
document.write('<OPTION value="http://www.nba.com/pistons/">Detroit</OPTION>');
document.write('<OPTION value="http://www.nba.com/warriors/">Golden State</OPTION>');
document.write('<OPTION value="http://www.nba.com/rockets/">Houston</OPTION>');
document.write('<OPTION value="http://www.nba.com/pacers/">Indiana</OPTION>');
document.write('<OPTION value="http://www.nba.com/clippers/">LA Clippers</OPTION>');
document.write('<OPTION value="http://www.nba.com/lakers/">LA Lakers</OPTION>');
document.write('<OPTION value="http://www.nba.com/grizzlies/">Memphis</OPTION>');
document.write('<OPTION value="http://www.nba.com/heat/">Miami</OPTION>');
document.write('<OPTION value="http://www.nba.com/bucks/">Milwaukee</OPTION>');
document.write('<OPTION value="http://www.nba.com/timberwolves/">Minnesota</OPTION>');
document.write('<OPTION value="http://www.nba.com/nets/">New Jersey</OPTION>');
document.write('<OPTION value="http://www.nba.com/hornets/">New Orleans</OPTION>');
document.write('<OPTION value="http://www.nba.com/knicks/">New York</OPTION>');
document.write('<OPTION value="http://www.nba.com/magic/">Orlando</OPTION>');
document.write('<OPTION value="http://www.nba.com/sixers/">Philadelphia</OPTION>');
document.write('<OPTION value="http://www.nba.com/suns/">Phoenix</OPTION>');
document.write('<OPTION value="http://www.nba.com/blazers/">Portland</OPTION>');
document.write('<OPTION value="http://www.nba.com/kings/">Sacramento</OPTION>');
document.write('<OPTION value="http://www.nba.com/spurs/">San Antonio</OPTION>');
document.write('<OPTION value="http://www.nba.com/sonics/">Seattle</OPTION>');
document.write('<OPTION value="http://www.nba.com/raptors/">Toronto</OPTION>');
document.write('<OPTION value="http://www.nba.com/jazz/">Utah</OPTION>');
document.write('<OPTION value="http://www.nba.com/wizards/">Washington</OPTION>');
document.write('</SELECT>');
document.write('</td>');
document.write('<td width="10">');
document.write('<td><a class="globalNavLink" href="http://www.geocities.com/jt490250/login.html" target="_parent">Login</a>');
document.write('<td class="globalNavVline">|');
document.write('<td><a class="globalNavLink" href="http://www.geocities.com/jt490250/signup.html" target="_parent">Sign-Up</a>');
document.write('<td class="globalNavVline">|');
document.write('<td><a class="globalNavLink" href="/tickets/tickets.html" target="_parent">Alfetc</a>');
document.write('<td class="globalNavVline">|');
document.write('<td><a class="globalNavLink" href="/help/faq.html" target="_parent">Chat</a>');
document.write('</form>');
document.write('</table>');

document.write('<table><td bgcolor=#00cccc><font size=1 color=red><script src="http://www.angelfire.com/la3/jt490250/copy.js"></script\></font></td></table>');
document.write('</center>');The stupid forums messed it up... :rolleyes: