Click to See Complete Forum and Search --> : Some help needed OnMouseOut


cogumelo
11-13-2004, 03:58 PM
Hi,

i'm trying to add this:

"onMouseOut=window.status='' '; return true"

to this code:

var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+' "OnMouseOver="window.status=\'Enviar esta página a um amigo\'; return true;">Recomendar a um amigo<\/A>';

i know i'm not doing it right but i can't seem to figure out the solution. Anyway, the idei is that on mouse out the status text of th browser returns to normal instead of remaining with the text i defined on the mouseover

help would be really appreciated.

thanks,
cogumelo

Charles
11-13-2004, 04:29 PM
You're better off doing something more like:

<script type="text/javascript">
linkText = 'Recomendar a um amigo';
document.write ('<a href="#">', linkText, '<\/a>');
l = document.links[document.links.length-1];
l.className = 'contact';
l.href = 'mailto:?SUBJECT=' + SubjectLine + '&amp;amp;BODY=' + BodyText;
l.onmouseout = function () {window.status = ''; return true}
l.onmouseover = function () {window.status = linkText; return true}
</script>

Just keep in mind that one out of ten users do not use JavaScript. So if this is at all important then you'll need a JavaScript free other way.

cogumelo
11-13-2004, 05:03 PM
Thanks for the quick answer. this is just a link to send an email recommending the site.

But now that you've mentioned the 1 out of 10 has javascript...

i have an old web site where the menu is called from a .js file:

<script language="javascript" src="menu.js"></script>

the menu is in the .js file.
this was an html website and this made it a lot easier to changes items on the menu

i'm curious on how would you solve this (without any php or similar) having the menu in one file and having the html call it (no frames either)?

is there a way of doing it without javascript?

regads.

Charles
11-13-2004, 05:11 PM
Originally posted by cogumelo
is there a way of doing it without javascript? Yes, with PHP or something similar like SSI.