473,491 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

CES
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 in**@test.com Thank you for your consideration.

becomes

at mailto:in**@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>
Jul 23 '05 #1
1 3272
> "CES" <no**@none.com> wrote:
news:Oy*****************@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 in**@test.com Thank you for your consideration.

becomes

at mailto:in**@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>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 //EN">
<html>
<head>
<title>
Untitled
</title>
<script type="text/javascript">
var sucker = "mailto:in**@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>in**@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>in**@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*

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5063
by: Vaca Louca | last post by:
Hello, My setup: Debian sarge on dual Pentium 4. g++ 3.3.5-3. (the other system is Windows XP with MS Visual Studio .NET 2003) I have an auto_array<T> template (based on a template taken from...
2
6044
by: Lateralus | last post by:
headers/vector3.h: In member function ‘Vector3 Vector3::operator*(Scalar)’: headers/vector3.h:13: error: no matching function for call to ‘Vector3::Vector3(Vector3)’...
3
4577
by: anurag | last post by:
Hi, Is "MERGE INTO..." statement allowed to be executed in a dynamic SQL statement, inside an SQL Stored Procedure? I am using DB2 UDB 8.1.2 on Windows. If it is not allowed (as I suspect),...
3
12249
by: A.C. Jetter | last post by:
I am using C# in Visual Studio.Net to create an application. The problem I am having is when the main form is moved around on the screen, the "panel" form that is displayed on the tab control...
2
2219
by: Paul E Collins | last post by:
I'm considering using the NetSpell spell checking engine in my application. However, NetSpell is licensed under the Lesser GPL, and I want to withhold my application's source code. The licence...
5
1732
by: Brad | last post by:
All samples related to this see to come short of being 'truly' dynamic. For instance, after creating all the code to load/save a properties value, you turn around and save it to one you KNOW...
6
6638
by: Richard Brown | last post by:
Ok, I celebrate and rejoice in the Anchor property. So wonderful compared to the horrible 'resize' code I had to write in VB6, there is just no end to the wonders of VB.NET..... uh, ok..... BUT......
3
2247
by: Juha Nieminen | last post by:
Consider this code: void foo(int& i) { i += 10; } int main() { int a = 1;
3
1447
by: idorjee | last post by:
Hi, Can anyone please tell me if there is a way to hyperlink to a web page which doesn't have the anchor "name" attribute (e.g., <a name="thename">), but has tags such as, <strong>. So, my question...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.