realbeginner
06-12-2002, 01:57 AM
Hi all,
I have the following code which redirects a page based on the screen resolution. I want the link to open in a new window and hide the address line in the browser. Can anyone help me.
function redirectPage()
{
var url640x480 = "HomePage800.htm";
var url800x600 = "HomePage800.htm";
var url1024x768 = "HomePage1024.htm";
if ((screen.Width == 640) && (screen.height == 480))
window.location.href= url640x480;
if ((screen.Width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.Width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else
window.location.href= url1024x768;
}
<a href=#><img src="Images/ProductTitle.gif" width="152" onClick="redirectPage()" height="35" border="0"></a>
Thanking you in advance.
I have the following code which redirects a page based on the screen resolution. I want the link to open in a new window and hide the address line in the browser. Can anyone help me.
function redirectPage()
{
var url640x480 = "HomePage800.htm";
var url800x600 = "HomePage800.htm";
var url1024x768 = "HomePage1024.htm";
if ((screen.Width == 640) && (screen.height == 480))
window.location.href= url640x480;
if ((screen.Width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.Width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else
window.location.href= url1024x768;
}
<a href=#><img src="Images/ProductTitle.gif" width="152" onClick="redirectPage()" height="35" border="0"></a>
Thanking you in advance.