Connecting Tech Pros Worldwide Forums | Help | Site Map

Dynamic anchor tag problem "@ OR @" causing function to failin IE

CES
Guest
 
Posts: n/a
#1: Jul 23 '05
All,

Could someone please look at this and tell me what's wrong... the function works properly in FireFox but in IE onmouseover it replaces the innerHTML. So the original html:

at info@test.com Thank you for your consideration.

becomes

at mailto:info@test.com:?SUBJECT=Request for additional information - Package id : /*JS var*/ Thank you for your consideration.

I know the problem is the @ sign because if I remove it the function works properly, but even encoding it doesn’t seem to work I get the same issue.

Any Help would be appreciated Thanks in advance - CES


XXXXXXXXXXXXXXXXX


function mailTO(sender){
document.getElementById('id_' + sender).setAttribute("href", "mailto:info" + "@" + "test.com:?SUBJECT=Request for additional information - Package id : ");
}

<a id="id_emailMe2" class="noExpandNormal" href="#" onmouseover="mailTO('emailMe2')">info@test.com</a>

BootNic
Guest
 
Posts: n/a
#2: Jul 24 '05

re: Dynamic anchor tag problem "@ OR &#064;" causing function to failin IE


> "CES" <none@none.com> wrote:[color=blue]
> news:OywEe.7817$Y54.3433@twister.nyc.rr.com....
>
> All,
>
> Could someone please look at this and tell me what's wrong... the
> function works properly in FireFox but in IE onmouseover it replaces
> the innerHTML. So the original html:
>
> at info@test.com Thank you for your consideration.
>
> becomes
>
> at mailto:info@test.com:?SUBJECT=Request for additional information -
> Package id : /*JS var*/ Thank you for your consideration.
>
> I know the problem is the @ sign because if I remove it the function
> works properly, but even encoding it doesn’t seem to work I get the
> same issue.
>
> Any Help would be appreciated Thanks in advance - CES
>
>
> XXXXXXXXXXXXXXXXX
>
>
> function mailTO(sender){
> document.getElementById('id_' + sender).setAttribute("href",
> "mailto:info" + "@" + "test.com:?SUBJECT=Request for additional
> information - Package id : "); }
>
> <a id="id_emailMe2" class="noExpandNormal" href="#"
> onmouseover="mailTO('emailMe2')">info@test.com</a>[/color]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 //EN">
<html>
<head>
<title>
Untitled
</title>
<script type="text/javascript">
var sucker = "mailto:info@test.com:?SUBJECT=Request for additional information - Package id :"
function mailTO(sender){
sender.setAttribute("href", sucker);
}
</script>
</head>
<body>
<a href="#" onmouseover="this.href=sucker" onmouseout=
"this.href='#'"><span>info@test.com</span></a>
<br>
<a href="#" onmouseover="this.href=sucker" onmouseout=
"this.href='#'">Info</a>
<br>
<a id="id_emailMe2" class="noExpandNormal" href="#" onmouseover=
"mailTO(this)"><span>info@test.com</span></a>
</body>
</html>


--
BootNic Saturday, July 23, 2005 6:56 PM

I try to take one day at a time, but sometimes several days attack me at once.
*Jennifer Unlimited*

Closed Thread