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!!