CR34T1ON
06-04-2004, 03:18 PM
Hello Everyone
im new here and i was wondering if anyone could help me
I have a Javascript code in my index page to open another page in another window!!
but what im trying to do is also add a mouse over effect so when you put your mouse over an image it changes and if you clikc the javascript works!!!
Ive got so far, but the mouse over effect doesnt work it keeps saying Java Error
Heres the code im using!
This is in the Head part
<script type="text/javascript" src="mover.js"></script>
<script language="Javascript" type="text/javascript">
function openWin()
{
var value = "red/main.html";
var nav = navigator.appVersion.charAt(0);
var nap = navigator.appName;
var xx = screen.width / 2 - 500;
var yy = screen.height / 2 - 400;
window.open(value,'DCFWin','resizable=no,screenX='+xx+',screenY='+yy+',width=500,height=400,status=n o,location=no,toolbar=no,menubar=no,scrollbars=no');
}
</script>
i got this code in the body part
<a onMouseOver="on1();" onMouseOut="off1();" href="javascript:openWin()"><img src="red1.jpg" width="173" height="125" border="0" name="a">
This is the Whole Java Part for the Mouse over
function on1()
{if (!document.images) return; document.a.src = "red2.jpg";}
function on2()
{if (!document.images) return; document.b.src = "black2.jpg";}
function on3()
{if (!document.images) return; document.c.src = "green2.jpg";}
function on4()
{if (!document.images) return; document.d.src = "blue2.jpg";}
function off1()
{if (!document.images) return; document.a.src = "red1.jpg";}
function off2()
{if (!document.images) return; document.b.src = "black1.jpg";}
function off3()
{if (!document.images) return; document.c.src = "green1.jpg";}
function off4()
{if (!document.images) return; document.d.src = "blue1.jpg";}
var imgslist = new Array(
"red2.jpg",
"black2.jpg",
"green2.jpg",
"blue2.jpg",
var imgs=new Array();
for (x=0; x<imgslist.length; x++)
if (document.images)
{imgs[x]=new Image(); imgs[x].src = imgslist[x];}
I would apreciate any help
im new here and i was wondering if anyone could help me
I have a Javascript code in my index page to open another page in another window!!
but what im trying to do is also add a mouse over effect so when you put your mouse over an image it changes and if you clikc the javascript works!!!
Ive got so far, but the mouse over effect doesnt work it keeps saying Java Error
Heres the code im using!
This is in the Head part
<script type="text/javascript" src="mover.js"></script>
<script language="Javascript" type="text/javascript">
function openWin()
{
var value = "red/main.html";
var nav = navigator.appVersion.charAt(0);
var nap = navigator.appName;
var xx = screen.width / 2 - 500;
var yy = screen.height / 2 - 400;
window.open(value,'DCFWin','resizable=no,screenX='+xx+',screenY='+yy+',width=500,height=400,status=n o,location=no,toolbar=no,menubar=no,scrollbars=no');
}
</script>
i got this code in the body part
<a onMouseOver="on1();" onMouseOut="off1();" href="javascript:openWin()"><img src="red1.jpg" width="173" height="125" border="0" name="a">
This is the Whole Java Part for the Mouse over
function on1()
{if (!document.images) return; document.a.src = "red2.jpg";}
function on2()
{if (!document.images) return; document.b.src = "black2.jpg";}
function on3()
{if (!document.images) return; document.c.src = "green2.jpg";}
function on4()
{if (!document.images) return; document.d.src = "blue2.jpg";}
function off1()
{if (!document.images) return; document.a.src = "red1.jpg";}
function off2()
{if (!document.images) return; document.b.src = "black1.jpg";}
function off3()
{if (!document.images) return; document.c.src = "green1.jpg";}
function off4()
{if (!document.images) return; document.d.src = "blue1.jpg";}
var imgslist = new Array(
"red2.jpg",
"black2.jpg",
"green2.jpg",
"blue2.jpg",
var imgs=new Array();
for (x=0; x<imgslist.length; x++)
if (document.images)
{imgs[x]=new Image(); imgs[x].src = imgslist[x];}
I would apreciate any help