Multiple onMouseOver calls
I have been trying to change a picture and at the same time displaying a message in the status bar as the mouse hovers over the picture. My code looks like this:
//Before the following code, create an array of
//pictures called "pics"
function changePic(from,to) {
if(document.images) {
document.images[from].src = pics[to].src;
}
}
function changeText(text) {
window.status=text;
return true;
}
function clearText() {
window.status='';
}
function changeIn(from, to, text) {
changeText(text);
changePic(from, to);
}
function changeOut(from, to) {
clearText();
changePic(from, to);
}
And the function call:
onMouseOver="changeIn('holder',01, 'some text');" onMouseOut="changeOut('holder',02);"
href= //the url
The functions changePic and changeText work fine separately, but when used at the same time, the status bar will still display an url instead of the message.
I have tried this every way that I can think of, could someone please help me?
//Before the following code, create an array of
//pictures called "pics"
function changePic(from,to) {
if(document.images) {
document.images[from].src = pics[to].src;
}
}
function changeText(text) {
window.status=text;
return true;
}
function clearText() {
window.status='';
}
function changeIn(from, to, text) {
changeText(text);
changePic(from, to);
}
function changeOut(from, to) {
clearText();
changePic(from, to);
}
And the function call:
onMouseOver="changeIn('holder',01, 'some text');" onMouseOut="changeOut('holder',02);"
href= //the url
The functions changePic and changeText work fine separately, but when used at the same time, the status bar will still display an url instead of the message.
I have tried this every way that I can think of, could someone please help me?
Sanna
July 27,