I appologise for reposting this but I have been trying to find a solution
all week with no avail and I was hoping a repost might help somebody more
knowledgable than myself to spot the message...
I am trying to write a webpage in Javascript. The page loads with three
frames, a top, left and right frame.
Depending on the users actions the background page rewrites the code for the
relevant frames.
The problem I am having is that I have four rollover states for each button.
"Unused", "Unused with mouseover", "Used", and "Used with mouseover".
The "Unused" state has a slightly lighter shadow than the "Used" state and
the mouseover actions place a fingerprint over the icon the user is about to
click.
The problem is that the images do not seem to be loading and refreshing
correctly.
A link to the page in progress can be seen below:
http://www.asgf80.dsl.pipex.com/Java/Index.html
Failing that the original code follows below.
Thankyou for taking the time to read this and any help will be greatly
appreciated.
John Ortt.
Code Follows:
\\\\\\\\\\\\\\\ \\\\\\
<html>
<head>
<title>Welcom e to John Ortt's Homepage</title>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=is o-8859-1">
<title>Welcom e to John Ortt's Internet Site</title>
<SCRIPT language=javasc ript type=text/javascript>
<!-- Hide Me
if (top.location != self.location) {top.location = self.location}
if (document.image s)
{
up = new Array("Up.gif", "UpF.gif","UpP. gif","UpFP.gif" );
aboutMe = new
Array("AboutMe. gif","AboutMeF. gif","AboutMeP. gif","AboutMeFP .gif");
myCv = new Array("MyCV.gif ","MyCVF.gif"," MyCVP.gif","MyC VFP.gif");
javaScript = new
Array("Javascri pt.gif","Javasc riptF.gif","Jav ascriptP.gif"," JavascriptFP.gi f
");
projects = new
Array("Projects .gif","Projects F.gif","Project sP.gif","Projec tsFP.gif");
var up_1=0
var up_2=0
var about_me=0
var my_cv=0
var java_script=0
var projects_1=0
}
else
{
up = "";
document.up = "";
aboutMe = "";
document.aboutm e = "";
myCV = "";
document.myCV = "";
javaScript= "";
document.javaSc ript = "";
projects = "";
document.projec ts = "";
}
function evalRollon(item )
{
if (item==98) Left.up.src = (up_1==0) ? up[1] : up[3]
if (item==99) Left.up.src = (up_2==0) ? up[1] : up[3]
if (item==1) Left.about.src = (about_me==0) ? aboutMe[1] : aboutMe[3]
if (item==2) Left.cv.src = (my_cv==0) ? myCv[1] : myCv[3]
if (item==6) Left.java.src = (java_script==0 ) ? javaScript[1] :
javaScript[3]
if (item==8) Left.projects.s rc = (projects_1==0) ? projects[1] :
projects[3]
}
function evalImage(item)
{
if (item==98) Left.up.src = (up_1==0) ? up[0] : up[2]
if (item==99) Left.up.src = (up_2==0) ? up[0] : up[2]
if (item==1) Left.about.src = (about_me==0) ? aboutMe[0] : aboutMe[2]
if (item==2) Left.cv.src = (my_cv==0) ? myCv[0] : myCv[2]
if (item==6) Left.java.src = (java_script==0 ) ? javaScript[0] :
javaScript[2]
if (item==8) Left.projects.s rc = (projects_1==0) ? projects[0] :
projects[2]
}
function mainMenu()
{
parent.Left.doc ument.close()
parent.Left.doc ument.open()
parent.Left.doc ument.writeln(' <html><head
onLoad="top.eva lImage(1)","top .evalImage(8)," top.evalImage(9 8)">')
parent.Left.doc ument.writeln(" <TITLE>Welcom e to John Ortts Internet Page -
Contents Menu</TITLE>")
parent.Left.doc ument.writeln(' </head><body bgcolour="white ">')
parent.Left.doc ument.writeln(' <P><A target=Left')
parent.Left.doc ument.writeln(' onclick="top.ab outmemenu()";"t op.about_me++"' )
parent.Left.doc ument.writeln(' onmouseout="top .evalImage(1)"' )
parent.Left.doc ument.writeln(' onmouseover="to p.evalRollon(1) ">')
parent.Left.doc ument.writeln(' <img src="AboutMe.gi f" alt="About Me"
width=250 height=50 border=0 name="about"></A>')
parent.Left.doc ument.writeln(' </P><P><A href="top.proje cts()"
target=Left')
parent.Left.doc ument.writeln(' onclick="top.pr ojectsmenu()";
"top.projects_1 ++"')
parent.Left.doc ument.writeln(' onmouseout="top .evalImage(8)"' )
parent.Left.doc ument.writeln(' onmouseover="to p.evalRollon(8) ">')
parent.Left.doc ument.writeln(' <img src="Projects.g if" alt="Projects"
width=250 height=50 border=0 name="projects" ></A>')
parent.Left.doc ument.writeln(' </P>')
parent.Left.doc ument.writeln(" </body></html>")
parent.Top.docu ment.close()
parent.Top.docu ment.open()
parent.Top.docu ment.writeln('< html><head><TIT LE>Welcome to Johns Internet
Page</TITLE></head>')
parent.Top.docu ment.writeln('< body bgcolour="white "><p>Title Goes
Here</p></body></html>')
}
function aboutmemenu()
{
parent.Left.doc ument.close()
parent.Left.doc ument.open()
parent.Left.doc ument.writeln(' <html><head
onLoad="top.eva lImage(98)","to p.evalImage(2)" >')
parent.Left.doc ument.writeln(" <TITLE>Welcom e to John Ortts Internet Page -
About Me Menu</TITLE>")
parent.Left.doc ument.writeln(' </head><body bgcolour="white ">')
parent.Left.doc ument.writeln(' <P><A target=Left')
parent.Left.doc ument.writeln(' onclick="top.ma inMenu()"; "top.up_1++ "')
parent.Left.doc ument.writeln(' onmouseout="top .evalImage(98)" ')
parent.Left.doc ument.writeln(' onmouseover="to p.evalRollon(98 )"')
parent.Left.doc ument.writeln(' onLoad="top.eva lImage(98)">')
parent.Left.doc ument.writeln(' <img src=top.evalIma ge(98) alt="Up" width=250
height=50 border=0 name="up"></A>')
parent.Left.doc ument.writeln(' </P><P><A href="mycv.html " target=Right')
parent.Left.doc ument.writeln(' onclick="top.my _cv++"')
parent.Left.doc ument.writeln(' onmouseout="top .evalImage(2)"' )
parent.Left.doc ument.writeln(' onmouseover="to p.evalRollon(2) "')
parent.Left.doc ument.writeln(' onLoad=top.eval Image(2)>')
parent.Left.doc ument.writeln(' <img src="top.evalIm age(2)" alt="My CV"
width=250 height=50 border=0 name="cv"></A>')
parent.Left.doc ument.writeln(' </P>')
parent.Left.doc ument.writeln(" </body></html>")
}
function projectsmenu()
{
parent.Left.doc ument.close()
parent.Left.doc ument.open()
parent.Left.doc ument.writeln(" <html><head>" )
parent.Left.doc ument.writeln(" <TITLE>Welcom e to John Ortts Internet Page -
About Me Menu</TITLE>")
parent.Left.doc ument.writeln(' </head><body bgcolour="white ">')
parent.Left.doc ument.writeln(' <P><A target=Left')
parent.Left.doc ument.writeln(' onclick="top.ma inMenu()"; "top.up_2++ "')
parent.Left.doc ument.writeln(' onmouseout="top .evalImage(99)" ')
parent.Left.doc ument.writeln(' onmouseover="to p.evalRollon(99 )"')
parent.Left.doc ument.writeln(' onLoad="top.eva lImage(99)" return="false"> ')
parent.Left.doc ument.writeln(' <img src="top.evalIm age(99)" alt="Up"
width=250 height=50 border=0 name="up"></A>')
parent.Left.doc ument.writeln(' </P><P><A href="javascrip t.html"
target=Right')
parent.Left.doc ument.writeln(' onclick="top.ja va_script++"')
parent.Left.doc ument.writeln(' onmouseout="top .evalImage(6)"' )
parent.Left.doc ument.writeln(' onmouseover="to p.evalRollon(6) "')
parent.Left.doc ument.writeln(' onLoad="top.eva lImage(6)" return="false"> ')
parent.Left.doc ument.writeln(' <img src="top.evalIm age(6)" alt="Java"
width=250 height=50 border=0 name="java"></A>')
parent.Left.doc ument.writeln(' </P>')
parent.Left.doc ument.writeln(" </body></html>")
}
// Stop Hiding Me. -->
</SCRIPT>
</head>
<frameset rows="80,*" framespacing="0 " border="0" frameborder="NO ">
<frame name="Top" noresize>
<frameset cols="250,*" framespacing="0 " border="0" frameborder="NO "
onload="mainMen u()">
<frame name="Left" noresize>
<frame src="Right.html " name="Right" noresize>
</frameset>
</frameset>
<noframes>
<body>
</body>
</noframes>
</html>