A__jay
03-09-2006, 09:59 PM
well, i got this awesome script from a1scripts.com. It was this script that lets me do mouseover buttons that will change on mouseover, and will aslo affect another image, somewhere else, and it worked fine. But the script came with only two buttons, and I needed more, so i went ahead and copy and pasted some parts, edited it a bit, ran into a lot of problems, solved them all, except this one:
The two buttons at the bottom, whenever i mouseover them, they dont change, but the two above them do, also, the seperate image. I know its a bit confusing, so heres a link to the code in action:
http://www.freewebs.com/ajay91/index.htm
here is the code:
<html>
<head>
<script language="javascript">
<!-- hide script from old browsers
window.onerror = null;
var netscape = 0;
var goodIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3)
{ netscape = 1; }
if (browserName == "Microsof" && browserVer >= 4)
{ goodIE = 1; }
// end error trapping code
if (netscape || goodIE) {
pic1 = new Image(200,200);
pic1.src = "http://i44.photobucket.com/albums/f32/A__jay/topandbottomtest.jpg";
pic2 = new Image(200,200);
pic2.src = "http://i44.photobucket.com/albums/f32/A__jay/middleareatest.jpg";
pic3 = new Image(200,200);
pic3.src = "http://i44.photobucket.com/albums/f32/A__jay/Ajays-Sample-Sites--Begi-07.gif";
pic4 = new Image(200,200);
pic4.src = "http://i3.photobucket.com/albums/y77/ajissad/topper500x900.jpg";
pic5 = new Image(200,200);
pic5.src = "http://i3.photobucket.com/albums/y77/ajissad/guides4.jpg";
a1 = new Image();
a1.src = "http://i44.photobucket.com/albums/f32/A__jay/HOME.jpg";
a2 = new Image();
a2.src = "http://i44.photobucket.com/albums/f32/A__jay/HOMEMO.jpg";
b1 = new Image();
b1.src = "http://i44.photobucket.com/albums/f32/A__jay/generalinfo.jpg";
b2 = new Image();
b2.src = "http://i44.photobucket.com/albums/f32/A__jay/generalinfoMO.jpg"
c1 = new Image();
c1.src = "http://i44.photobucket.com/albums/f32/A__jay/pc.jpg";
c2= new Image();
c2.src = "http://i44.photobucket.com/albums/f32/A__jay/pcMO.jpg";
d1 = new Image();
d1.src = "http://i44.photobucket.com/albums/f32/A__jay/admin.jpg";
d2 = new Image();
d2.src = "http://i44.photobucket.com/albums/f32/A__jay/adminMO.jpg";
}
function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2) {
if (netscape || goodIE) {
document.images[imgDocID].src = eval(imgObjName + ".src");
document.images[imgDocID2].src = eval(imgObjName2 + ".src");
}}
//end hiding -->
</script>
<img SRC="http://i3.photobucket.com/albums/y77/ajissad/SCREEnies.gif" NAME="pic" ALT="Default Image" height=200 width=200>
<div align="center" style="position:absolute; top:208; left:8;">
<a href="" onMouseOver="hiLite('pic','pic2','a','a2'); window.status='Button 1';return true;" onMouseOut="hiLite('pic','pic1','a','a1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/HOME.jpg" NAME="a" ALT="Button 1" BORDER=1 height= width=></a><br>
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 2';return true;" onMouseOut="hiLite('pic','pic1','b','b1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/generalinfo.jpg" NAME="b" ALT="Button 2" BORDER=1 height= width=></a><br>
<a href="" onMouseOver="hiLite('pic','pic2','a','a2'); window.status='Button 3';return true;" onMouseOut="hiLite('pic','pic1','c','c1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/pc.jpg" NAME="a" ALT="Button 1" BORDER=1 height= width=></a><br>
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 4';return true;" onMouseOut="hiLite('pic','pic1','d','d1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/admin.jpg" NAME="b" ALT="Button 2" BORDER=1 height= width=></a>
</div>
so like, i know some of the solution, actually; info that will help you help me;D):
in all these parts, i tried to fix it, and it just got messed up xD
well, i copied this part a few times, so the problem might be here, specfically in the "'pic','pic3','b','b2')" part
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 4';return true;" onMouseOut="hiLite('pic','pic1','d','d1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/admin.jpg" NAME="b" ALT="Button 2" BORDER=1 height= width=></a>
it might be in this area
function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2) {
if (netscape || goodIE) {
document.images[imgDocID].src = eval(imgObjName + ".src");
document.images[imgDocID2].src = eval(imgObjName2 + ".src");
or soemwhere here, but i doubt it:
c1 = new Image();
c1.src = "http://i44.photobucket.com/albums/f32/A__jay/pc.jpg";
c2= new Image();
c2.src = "http://i44.photobucket.com/albums/f32/A__jay/pcMO.jpg";
d1 = new Image();
d1.src = "http://i44.photobucket.com/albums/f32/A__jay/admin.jpg";
d2 = new Image();
d2.src = "http://i44.photobucket.com/albums/f32/A__jay/adminMO.jpg";
any, and all help will be very much apprecitiated :D
and if u want payment back, ill make graphics for you:
examples of my work:
http://i3.photobucket.com/albums/y77/ajissad/gubanner.jpg
http://i3.photobucket.com/albums/y77/ajissad/bannerv2.jpg
http://i3.photobucket.com/albums/y77/ajissad/banner.jpg
thanks alot :D
-ajayyy <33333
The two buttons at the bottom, whenever i mouseover them, they dont change, but the two above them do, also, the seperate image. I know its a bit confusing, so heres a link to the code in action:
http://www.freewebs.com/ajay91/index.htm
here is the code:
<html>
<head>
<script language="javascript">
<!-- hide script from old browsers
window.onerror = null;
var netscape = 0;
var goodIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3)
{ netscape = 1; }
if (browserName == "Microsof" && browserVer >= 4)
{ goodIE = 1; }
// end error trapping code
if (netscape || goodIE) {
pic1 = new Image(200,200);
pic1.src = "http://i44.photobucket.com/albums/f32/A__jay/topandbottomtest.jpg";
pic2 = new Image(200,200);
pic2.src = "http://i44.photobucket.com/albums/f32/A__jay/middleareatest.jpg";
pic3 = new Image(200,200);
pic3.src = "http://i44.photobucket.com/albums/f32/A__jay/Ajays-Sample-Sites--Begi-07.gif";
pic4 = new Image(200,200);
pic4.src = "http://i3.photobucket.com/albums/y77/ajissad/topper500x900.jpg";
pic5 = new Image(200,200);
pic5.src = "http://i3.photobucket.com/albums/y77/ajissad/guides4.jpg";
a1 = new Image();
a1.src = "http://i44.photobucket.com/albums/f32/A__jay/HOME.jpg";
a2 = new Image();
a2.src = "http://i44.photobucket.com/albums/f32/A__jay/HOMEMO.jpg";
b1 = new Image();
b1.src = "http://i44.photobucket.com/albums/f32/A__jay/generalinfo.jpg";
b2 = new Image();
b2.src = "http://i44.photobucket.com/albums/f32/A__jay/generalinfoMO.jpg"
c1 = new Image();
c1.src = "http://i44.photobucket.com/albums/f32/A__jay/pc.jpg";
c2= new Image();
c2.src = "http://i44.photobucket.com/albums/f32/A__jay/pcMO.jpg";
d1 = new Image();
d1.src = "http://i44.photobucket.com/albums/f32/A__jay/admin.jpg";
d2 = new Image();
d2.src = "http://i44.photobucket.com/albums/f32/A__jay/adminMO.jpg";
}
function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2) {
if (netscape || goodIE) {
document.images[imgDocID].src = eval(imgObjName + ".src");
document.images[imgDocID2].src = eval(imgObjName2 + ".src");
}}
//end hiding -->
</script>
<img SRC="http://i3.photobucket.com/albums/y77/ajissad/SCREEnies.gif" NAME="pic" ALT="Default Image" height=200 width=200>
<div align="center" style="position:absolute; top:208; left:8;">
<a href="" onMouseOver="hiLite('pic','pic2','a','a2'); window.status='Button 1';return true;" onMouseOut="hiLite('pic','pic1','a','a1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/HOME.jpg" NAME="a" ALT="Button 1" BORDER=1 height= width=></a><br>
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 2';return true;" onMouseOut="hiLite('pic','pic1','b','b1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/generalinfo.jpg" NAME="b" ALT="Button 2" BORDER=1 height= width=></a><br>
<a href="" onMouseOver="hiLite('pic','pic2','a','a2'); window.status='Button 3';return true;" onMouseOut="hiLite('pic','pic1','c','c1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/pc.jpg" NAME="a" ALT="Button 1" BORDER=1 height= width=></a><br>
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 4';return true;" onMouseOut="hiLite('pic','pic1','d','d1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/admin.jpg" NAME="b" ALT="Button 2" BORDER=1 height= width=></a>
</div>
so like, i know some of the solution, actually; info that will help you help me;D):
in all these parts, i tried to fix it, and it just got messed up xD
well, i copied this part a few times, so the problem might be here, specfically in the "'pic','pic3','b','b2')" part
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 4';return true;" onMouseOut="hiLite('pic','pic1','d','d1'); window.status='';return true;" onclick="window.focus()"><img SRC="http://i44.photobucket.com/albums/f32/A__jay/admin.jpg" NAME="b" ALT="Button 2" BORDER=1 height= width=></a>
it might be in this area
function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2) {
if (netscape || goodIE) {
document.images[imgDocID].src = eval(imgObjName + ".src");
document.images[imgDocID2].src = eval(imgObjName2 + ".src");
or soemwhere here, but i doubt it:
c1 = new Image();
c1.src = "http://i44.photobucket.com/albums/f32/A__jay/pc.jpg";
c2= new Image();
c2.src = "http://i44.photobucket.com/albums/f32/A__jay/pcMO.jpg";
d1 = new Image();
d1.src = "http://i44.photobucket.com/albums/f32/A__jay/admin.jpg";
d2 = new Image();
d2.src = "http://i44.photobucket.com/albums/f32/A__jay/adminMO.jpg";
any, and all help will be very much apprecitiated :D
and if u want payment back, ill make graphics for you:
examples of my work:
http://i3.photobucket.com/albums/y77/ajissad/gubanner.jpg
http://i3.photobucket.com/albums/y77/ajissad/bannerv2.jpg
http://i3.photobucket.com/albums/y77/ajissad/banner.jpg
thanks alot :D
-ajayyy <33333