[Javascript]Extra Box for Extra Room

Started by Jek, August 28, 2010, 04:25:16 am

Previous topic - Next topic

Jek

August 28, 2010, 04:25:16 am Last Edit: August 28, 2010, 04:29:28 am by Jek
    Im guessing most of you are familiar with my website GameCraft. I have been working my ass off on the website, and I need the help of those of you who know Javascript. With my standard sized monitor, I can only fit four boxes at the top. With a widescreen monitor (That I am sure most of you have), you can fit a fifth box in there. So my problem is that people with standard sized monitors will have problems with the fifth box being inserted.
   I did some research, and I compiled this code to insert the fifth box:

<script type="text/javascript">
if (screen.width<=100) document.write('<td width="20%"><table border="0" cellpadding="0" cellspacing="0" width="162">
<tr><td height="29" style="background:url('/Custom/Top2.png');color:#116111;" align="center"><b>Newest Tutorial</b></td></tr>
<tr><td height="160" style="background:url('/Custom/Middle2.png') #000000;padding:5px 5px 0 5px;">$MYINF_8$</td></tr>
<tr><td><img src="/Custom/Bottom2.png" border="0"></td></tr>
</table>
</td>')
</script>


And yet, when I test this code out in widescreen monitors, no fifth box appears!
Now, uCoz does allow javascript. I know this because I used simple javascript to make the "Random Monster Generator".

Edit: The $MYINF_8$ is what is inside the box, not part of the box itself.

SquareMan

hmm, i dont know javascript but that seems like a problem! lol.
have you checked for syntax errors?
QuoteThey've got helmets on they're heads. But I gotta watermeloan instead!