Connecting Tech Pros Worldwide Help | Site Map

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

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 09:35 PM
CES
Guest
 
Posts: n/a
Default Dynamic anchor tag problem "@ OR @" causing function to failin IE

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>

  #2  
Old July 23rd, 2005, 11:35 PM
BootNic
Guest
 
Posts: n/a
Default Re: Dynamic anchor tag problem "@ OR &#064;" causing function to fail in 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*

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.