Erindesign
10-23-2006, 08:14 PM
I have madea website, which is pretty unfortunate. I was originally messing around for about 2 days, and came up with a great layout. The bad side is that the background is 1030px. If screen width is greater than 1030 (1024) then it shows up as blank space. I came up with some javascript code based on the trusty google.com. I want:
If screen width is less than 1024, print <a href="JSmedia.php">Continue</a>
Else <a href="javascript:popUp('JSmedia.php')">Continue</a>
<script language='Javascript'>
<!--
windowheight=screen.height;
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=0,width=1032,height="+ windowheight +",left = 125,top = 0,title=js');");
}
if (screen.width <=1024){
---------------------------
}
else{
---------------------------
}
//-->
</script>
I don't know how to print/echo a link in javascript. the dashes represent the displayed links. That's where I am stuck.
If screen width is less than 1024, print <a href="JSmedia.php">Continue</a>
Else <a href="javascript:popUp('JSmedia.php')">Continue</a>
<script language='Javascript'>
<!--
windowheight=screen.height;
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=0,width=1032,height="+ windowheight +",left = 125,top = 0,title=js');");
}
if (screen.width <=1024){
---------------------------
}
else{
---------------------------
}
//-->
</script>
I don't know how to print/echo a link in javascript. the dashes represent the displayed links. That's where I am stuck.