1
Fizxx
Javascript in theme.html
  • 2005/2/2 11:32

  • Fizxx

  • Just popping in

  • Posts: 1

  • Since: 2005/2/2 1


Greetings all, I am trying to add some javascript code in theme.html to resize my banner pictures for different resolutions, but it is not working. Here is what I got, The variables are not final, I just put some random variables in for testing.

<script language="JavaScript" type="text/javascript">
<!--
var logoImageWidth;
function GetLogoWidth(logoImageWidth){

if(screen.width == 1024 && screen.height == 768)

else if(screen.width == 960 && screen.height == 720)

else if(screen.width <= 800 && screen.height <= 600)

else if(screen.width == 1152 && screen.height == 864)

else if(screen.width >= 1280 && screen.height >= 1024){
logoImageWidth = 10;}
return logoImageWidth;}
//-->
</script>
</head>

<body>
<table cellspacing="0">

<tr id="header">
<td id="headerlogo" bgcolor="Black"><div align="left"><img src="<{$xoops_imageurl}>logo1.gif" width="logoAImage(a)" height="logoAImage(b)" alt="" /></div></td>
<td id="headerlogo" bgcolor="Black"><div align="center"><img src="<{$xoops_imageurl}>logo.gif" width="GetLogoWidth(logoImageWidth)" height="logoImage(b)" alt="" /></div></td>

I am really stumped on this one, any help would be helpful.

BTW, I have tried many different combinations and I dont know whats going on!!

Login

Who's Online

239 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 239


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits