Click to See Complete Forum and Search --> : onmouserover alt is not working in netscape


javascriptuser1
11-29-2003, 05:54 AM
onmouseover is not working in netscape i mean

when i movethe curson the below alt is not working
alt="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)


the same is working fine in Internet Exploer.

where i am wrong.



<script language="JavaScript">
<!--

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<a href="registration.cfm"><img name="Infoem" border="0" src="../images/infob.jpg" width="18" height="18" alt="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)">test</a>

Khalid Ali
11-29-2003, 06:20 AM
use alt + title in those cases

javascriptuser1
11-29-2003, 06:30 AM
i am not good at javascript.
As per ur hint i tried like this


instead of alt i just title
title="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)"

and its not showing netscape the full text which i wrote above

the same is working fine.

can u give a sample how to use alt + title

javascriptuser1
11-29-2003, 06:38 AM
i tried like below


<a href="registration.cfm"><img name="Infoem" border="0" src="../images/infob.jpg" width="18" height="18" alt="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)" title="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)" >test</a>


but its not showing the total text .

its showing only

Please provide your correct E-mail for correspondence which we will send your acco

and missing the below text.

unt details to.(Like hotmail, yahoo, or any private email)

where i am wrong.

Pittimann
11-29-2003, 07:33 AM
Hi!

First of all: the code you posted in your attachment works. I tested it in Netscape 4.7

Adding the title attribute to the img tag doesn't bring anything in Netscape.

I took the following specifications (or better: interpretations made by Netscape) for the img tag from http://devedge.netscape.com/library/manuals/1998/htmlguide/tags8.html#1310399:

<IMG
SRC="location"
LOWSRC="location"
ALT="alterntiveText"
ALIGN="alignment"
BORDER="borderWidth"
HEIGHT="height"
WIDTH="width"
HSPACE="horizMargin"
VSPACE="verticalMargin"
ISMAP
USEMAP="#mapName"
NAME="imageName"
ONABORT="imgLoadJScode"
ONERROR="errorJScode"
ONLOAD="imgLoadJScode"
SUPPRESS="suppressOrNot"
>
----------------
On my machine, the only difference between the tooltip displayed in IE and in NS is (apart from the font) that NS doesn't make a linebreak.

My assumption is that your screen is too small to display the complete text as a tooltip in NS.

Cheers - Pit

javascriptuser1
11-29-2003, 11:57 PM
i just go through the syntax which u posted here.

i am using Netscape 7.1

i just open this link netscape 7.1 alt is not working.

http://devedge.netscape.com/library/manuals/1998/htmlguide/images.html

with The same link alt is working in I.E.

how can we solve this?

Pittimann
11-30-2003, 01:32 AM
Hi!

Coming back to Khalid Ali's proposal:
use alt + title in those cases
For sure he wanted to tell you to use the alt attribute with the image and the title attribute with the anchor:

<a href="registration.cfm" title="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)"><img name="Infoem" border="0" src="../images/infob.jpg" width="18" height="18" alt="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)">test</a>.

Due to the fact that I am using NS 4.7 (only for testing - where your original code works btw) I can't tell you whether this fixes the prob. Just give it a try instad of using both attributes in the img tag...

Cheers - Pit

javascriptuser1
11-30-2003, 02:52 AM
hi,
i tried your comment.
<a href="registration.cfm" title="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)"><img name="Infoem" border="0" src="../images/infob.jpg" width="18" height="18" alt="Please provide your correct E-mail for correspondence which we will send your account details to.(Like hotmail, yahoo, or any private email)">test</a>.

but still in netscape
its not showing the total text .

its showing only

Please provide your correct E-mail for correspondence which we will send your acco

and missing the below text.

unt details to.(Like hotmail, yahoo, or any private email)

any idea how to solve this.

Pittimann
11-30-2003, 02:56 AM
Hi!

Don't like to repeat myself - anyway: what screen resolution are you running???

Cheers - Pit

javascriptuser1
11-30-2003, 03:02 AM
hi,
my screen is

colors :true colors
screen area :1024 by 768 pixels.

javascriptuser1
12-02-2003, 02:27 AM
any solution to my problem???

Pittimann
12-02-2003, 03:05 AM
Hi!

Maybe Netscape 7 has a limit for the alt= text (??). As your screen res is 1024, there is enough space to display your text even without breaking it into two lines.

Are you sure you don't have an extra quote in the word "account" (like: acco"unt)?

Whatever it is, the original task of the alt attribute has never been to serve as a tooltip. Maybe individual tooltips instead of alt="blah" will help you out. The following claimes to work in all 4.0+ browsers:

http://javascript.internet.com/messages/description-layer.html#source

Due to the fact, that your code works very well in "my" NS4.7, I don't see a reason for it not to work in a higher version.

Cheers - Pit

javascriptuser1
12-02-2003, 03:18 AM
Thank you very much for the valuable info.

i am sure that i don't have an extra quote in the word "account" .

i will cut down my text message in alt and title text.As per your comment i think this is the only solution will work.

Thanks again for the valuable info.