...

View Full Version : Adding a status property to a Mouseover



lmarshall
04-13-2003, 06:19 AM
I am creating a site with using images with mouseovers as links is there anyway I can add a status property to the mouseover?

<map name="Map">
<area shape="rect" coords="0,2,81,22" href="schools.htm" onMouseOver="change_schools('images/JPEG/jschools2.jpg')" onMouseOut="reset_schools()">
</map>

I would like to display "Click here to see our display of School Watches" in the status bar.

Thanks,

lmarshall

chrismiceli
04-13-2003, 06:29 AM
add this


<map name="Map">
<area shape="rect" coords="0,2,81,22" href="schools.htm" onMouseOver="change_schools('images/JPEG/jschools2.jpg'),status='whatever'" onMouseOut="reset_schools(),status=''">
</map>

lmarshall
04-13-2003, 06:41 AM
Sorry... :(


I still can't get it to work

wox3-iO
04-13-2003, 11:44 AM
If chrismiceli's code didin't work, try this:


<map name="Map">
<area shape="rect" coords="0,2,81,22" href="schools.htm" onMouseOver="change_schools('images/JPEG/jschools2.jpg');window.status='Click here!'" onMouseOut="reset_schools();window.status=''">
</map>


I haven't tested that but I believe it will work.
Tell me if it doesn't.

HairyTeeth
04-13-2003, 12:12 PM
onmouseover="status='Blah Blah';return true"

onmouseout="status='';return true"

Obelix
05-12-2003, 08:40 PM
Im having a problem when combining the mouse over and satus with document.write

i have something like this on my code:

document.write("<A HREF='"+linkAlbum[Rnd0]+"' onMouseOver='self.status'="+album[Rnd0]+"';return true'><IMG SRC='"+imagemAlbum[Rnd0]+"'</A>");

this doesnt seem to work. my guess it's a double quotes and silgle quotes problem, since i allways mess that out.

Can someone give me a hand?

Obelix

glenngv
05-13-2003, 11:39 AM
single quotes are in red

document.write('<A HREF="'+linkAlbum[Rnd0]+'"onMouseOver="self.status=\''+album[Rnd0]+'\';return true"><IMG SRC="'+imagemAlbum[Rnd0]+'"></A>');

Obelix
05-14-2003, 01:12 AM
Thx a bunch, Glenn, I had just tryed that and it worked, but now you gave me confirmation that i was doing it the right way, and not inventing...

Obe

P.S. Just as curiosity, the line that i wrote, had the quotes and the double quotes switched, and it still worked.

:D :thumbsup:

scriptkeeper
05-14-2003, 02:36 AM
it does not matter what "s you use just the order that
they are in. but glenngv is right this would be the beter way to do it



document.write('<A HREF="'+linkAlbum[Rnd0]
+'"onMouseOver="self.status=\''+album[Rnd0]+'\';return true"><IMG SRC="'+imagemAlbum[Rnd0]+'">
</A>');



as for the status message heres

another way u can try




<script>
function displayMsg(msg){
window.status=msg
}
</script>
<body>
<map name="Map">
<area shape="rect" coords="0,2,81,22" href="schools.htm"
onMouseOver="change_schools('images/JPEG/jschools2.jpg');displayMsg('click here
to change schools or something!')"
onMouseOut="reset_schools();displayMsg(' ')">
</map>
</body>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum