errrgg!!

liunx

Guest
I'm so frustrated and it makes me sad! I've tried to do image rollovers/mouseovers for the past two hours and it's STILL not working. I've tried every tutorial and different way to do it that I can, even the ones for idiots. Can someone please email me privately to help me with this issue? I think it's going to take a lot more than just a board. Sorry if I sound pissed right now, I kind of am (only because of the html/java crisis):mad: :mad: :( :(<!--content-->Why does it have to be a private e-mail? Is it because you think it might be too easy for other people, and you will be counted as a loser/tard? Not to sound offensive. I just think it should be posted here that way other people who don't know how to make the rollovers can learn how. Just a thought.<!--content-->No, that's not it at all. Sorry, it was a stupid idea. I was just hoping that someone could go into my html editor and see what I was doing wrong or something. Instead, I'll post what I have and see what I am doing wrong. <br />
<br />
<script language="JavaScript"><br />
if (document.images) {<br />
image1on = new Image();<br />
image1on.src=http://www.htmlforums.com/archive/index.php/"1.jpg";<br />
<br />
image1off = new Image();<br />
image1off.src = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/">http://www.htmlforums.com/archive/index.php/</a><!-- m -->"21.jpg";<br />
<br />
}<br />
<br />
function turnOn(imageName) {<br />
if (document.images) {<br />
document[imageName].src = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/eval(imageName">http://www.htmlforums.com/archive/index ... (imageName</a><!-- m --> + "on.src");<br />
}<br />
}<br />
<br />
function turnOff(imageName) {<br />
if (document.images) {<br />
document[imageName].src = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/eval(imageName">http://www.htmlforums.com/archive/index ... (imageName</a><!-- m --> + "off.src");<br />
}<br />
}<br />
<br />
// --><br />
</script><br />
</head><br />
<body><br />
<A HREF=http://www.htmlforums.com/archive/index.php/"main.html" onMouseOver="turnOn('image1')" onMouseOut="turnOff('image1')"><br />
<IMG SRC=http://www.htmlforums.com/archive/index.php/"21.jpg" NAME="image1" BORDER="0" WIDTH="133" HEIGHT="44"></a></body></html><br />
<br />
<br />
<br />
<br />
<br />
Could someone look at it and tell me what I'm doing wrong?<br />
btw if you want to cview the picture it's <!-- m --><a class="postlink" href="http://www.angelfire.com/mo3/tepid_lies/ex.html">http://www.angelfire.com/mo3/tepid_lies/ex.html</a><!-- m --><!--content-->Here's how I do it!<br />
<br />
Put this in your head:<br />
<br />
<script type="text/javascript"><br />
<!--<br />
function MM_jumpMenu(targ,selObj,restore){ //v3.0<br />
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");<br />
if (restore) selObj.selectedIndex=0;<br />
}<br />
//--><br />
</script><br />
<!-- #EndEditable --><br />
<br />
<script type="text/javascript"><br />
<!--<br />
function MM_preloadImages() { //v3.0<br />
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();<br />
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)<br />
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=http://www.htmlforums.com/archive/index.php/a;}}<br />
}<br />
<br />
function MM_swapImgRestore() { //v3.0<br />
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=http://www.htmlforums.com/archive/index.php/x.oSrc;<br />
}<br />
<br />
function MM_findObj(n, d) { //v3.0<br />
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {<br />
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}<br />
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];<br />
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); return x;<br />
}<br />
<br />
function MM_swapImage() { //v3.0<br />
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)<br />
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=http://www.htmlforums.com/archive/index.php/x.src; x.src=a[i+2];}<br />
}<br />
//--><br />
</script> <br />
<br />
And put this as the link<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"?" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','/image-folder/image-on.gif',1)"><img src=http://www.htmlforums.com/archive/index.php/"/image-folder/image-off.gif" name="home" border="0" alt="home"></a> <br />
<br />
Make sure that name of the image is the same as the first instance of the mouseOver.<br />
<br />
The 1 at the end should always be there!<br />
<br />
See the source here (<!-- m --><a class="postlink" href="http://www.inkreations.com/">http://www.inkreations.com/</a><!-- m -->)<br />
<br />
HTH<!--content-->It's working fine for me. I suppose someone helped you with it?<!--content-->And yeah... I forgot to check before I posted my code but... it's working fine for me too!?!<!--content-->yes someone helped me, thank you!<!--content-->
 
Back
Top