SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Dec 5, 2002, 03:14 #1
- Join Date
- Oct 2002
- Location
- Still Thulcandra
- Posts
- 997
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problem with a simple rollover...
Hi,
I posted this in the troubleshooting section also, but I couldn't seem to get any views there... Sorry for my impatience, but I need an answer as fast as possible, so I would appreciate it a lot if someone could help...
I've been making a rather simple site. The navigation was supposed to use rollover, and they were working fine.
I made some alterations, and all of a sudden it starts to freak out a little...
On the pages that I made the alterations today, they don't work, on the ones I changed yesterday, they work...
The ones that doesn't work looks something like this:
Image8= new Image(80,60)
Image8.src = "images/button04h.jpg"
Image9= new Image(80,60)
Image9.src = "images/button05.jpg"
Image10= new Image(80,60)
Image10.src = "images/button5h.jpg"
function SwapOut4() {
document.imageflip4.src = Image8.src; return true;
}
function SwapBack4() {
document.imageflip4.src = Image7.src; return true;
}
function SwapOut5() {
document.imageflip5.src = Image10.src; return true;
}
function SwapBack5() {
document.imagflip5.src = Image9.src; return true;
And in the actual page I have this:
<a href=index.htm OnMouseOver="SwapOut4()" OnMouseOut="SwapBack4()">
<img name=imageflip4 width=80 height=60 src=images/button04.jpg alt="Til Forsiden">
</a>
<a href=omoss.htm OnMouseOver="SwapOut5()" OnMouseOut="SwapBack5()">
<img name=imageflip5 width=80 height=60 src=images/button05.jpg alt="Om Skap en forandring">
</a>
I get the message that "object expected" or something in the first line of the <a> tags...
-
Dec 5, 2002, 04:52 #2
- Join Date
- Aug 2002
- Location
- Burpengary, Australia
- Posts
- 4,495
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
Try changing these -
Code:function SwapBack5() { document.imagflip5.src = Image9.src; return true; // change to function SwapBack5() { document.getElementByIf('imagflip5').src = Image9.src; return true; // and this <img name=imageflip4 width=80 height=60 src=images/button04.jpg alt="Til Forsiden"> // to <img name=imageflip4 id=imageflip4 width=80 height=60 src=images/button04.jpg alt="Til Forsiden">
Hope that helps
-
Dec 5, 2002, 05:01 #3
- Join Date
- Oct 2002
- Location
- Still Thulcandra
- Posts
- 997
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah, I'll get it!
Thanks!
Bookmarks