PDA

View Full Version : Image Over Troubles


StonedDevil
07-30-2005, 07:55 AM
Ok this is my first real dip into JS. Well i have this external js file that loads, and it is supposed to control the imageovers on my site. the test i did, with just the valid html, and valid css links worked beautifully. But when i went through, and added all the other imagswap stuff, it stopped working. Ive been looking at it for at least an hour, i really cant figure out what went wrong.

Heres my JS file, and like i said, this is my first time, so its simple, and there probably was an easier way to do this, but i just wanna fix this one, when i get better, ill worry about easier.
function htmlover(imgname){
imgname.src = "Link Images/valid_html_down.gif"
}
function htmlout(imgname){
imgname.src = "Link Images/valid_html.gif"
}

function cssover(imgname){
imgname.src = "Link Images/valid_css_down.gif"
}
function cssout(imgname){
imgname.src = "Link Images/valid_css.gif"
}

function homeover(imgname){
imgname.src = "buttons/buttondown_01.gif"
}
function homeout(imgname){
imgname.src = "buttons/buttonup_01.gif"
}

function tempover(imgname){
imgname.src = "buttons/buttondown_02.gif"
}
function tempout(imgname){
imgname.src = "buttons/buttonup_02.gif"
}

function tutover(imgname){
imgname.src = "buttons/buttondown_03.gif"
}
function tutout{imgname){
imgname.src = "buttons/buttonup_03.gif"
}

function forumover(imgname){
imgname.src = "buttons/buttondown_04.gif"
}
function forumout(imgname){
imgname.src = "buttons/buttonup_04.gif"
}

function blogover(imgname){
imgname.src = "buttons/buttondown_05.gif"
}
function blogout(imgname){
imgname.src = "buttons/buttonup_05.gif"
}

function linkover(imgname){
imgname.src = "buttons/buttondown_06.gif"
}
function linkout(imgname){
imgname.src = "buttons/buttonup_06.gif"
}

function contactover(imgname){
imgname.src = "buttons/buttondown_07.gif"
}
function contactout(imgname){
imgname.src = "buttons/buttonup_07.gif"
}{ And my site is:
http://www.stoneddevilinc.com

coothead
07-31-2005, 03:48 AM
Hi there StonedDevil,

you have a 'typo' error in this line...

function tutout{imgname){
imgname.src = "buttons/buttonup_03.gif"
}
...as you say that it is your 'first time' you may like to try and spot it for yourself. :)
If not, well, just let us know.:D