Problem with "@" symbol in anchor text...

E

ehm

I have encountered an issue that has me totally confused. I have a
page where the user clicks on a hyper-text link and is then directed
towards another page (passing additional variables, etc.). If the
anchor text does not contain the "@" symbol, clicking on the link
works in a normal fashion. However, if the anchor text is something
like "foo@test", then clicking on the text displays the full URL
(still goes to the correct link, but I don't want the URL displayed).
I've also tried substituting the "@" symbol with its decimal
equivalent, but no luck.

Essentially, in my case I am trying to pass additional variables
that will allow the user to navigate more freely within my WebLogic
application (these variables are not initially available to the
original URL, but are appended once the user clicks on the link). Any
help or input would be appreciated.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<BODY>

<A onClick="testFoo(this)" HREF="http://www.cnn.com">foo@test</A></TD>
<BR>
<BR>
<A onClick="testFoo(this)" HREF="http://www.cnn.com">footest</A></TD>
<BR>
<BR>

<SCRIPT>
function testFoo(selectedObject) {
selectedObject.href +=
"/2004/US/South/02/11/elderly.robber.ap/index.html";
} // testFoo
</SCRIPT>

</BODY>
</HTML>
 
M

Martin Honnen

ehm said:
I have encountered an issue that has me totally confused. I have a
page where the user clicks on a hyper-text link and is then directed
towards another page (passing additional variables, etc.). If the
anchor text does not contain the "@" symbol, clicking on the link
works in a normal fashion. However, if the anchor text is something
like "foo@test", then clicking on the text displays the full URL
(still goes to the correct link, but I don't want the URL displayed).
I've also tried substituting the "@" symbol with its decimal
equivalent, but no luck.

Essentially, in my case I am trying to pass additional variables
that will allow the user to navigate more freely within my WebLogic
application (these variables are not initially available to the
original URL, but are appended once the user clicks on the link). Any
help or input would be appreciated.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<BODY>

<A onClick="testFoo(this)" HREF="http://www.cnn.com">foo@test</A></TD>
<BR>
<BR>
<A onClick="testFoo(this)" HREF="http://www.cnn.com">footest</A></TD>
<BR>
<BR>

<SCRIPT>
function testFoo(selectedObject) {
selectedObject.href +=
"/2004/US/South/02/11/elderly.robber.ap/index.html";
} // testFoo
</SCRIPT>

Strange, that strange bug has never occured to me, and now two different
people seem to post about it in two different newsgroups at about the
same time.
I have just suggested to use

function changeLink (link, newHref) {
var oldInnerText = link.innerText;
link.href = newHref;
if (link.innerText != oldInnerText) {
link.innerText = oldInnerText;
}
}

as a workaround for that IE problem, so
changeLink (selectObject,
"/2004/US/South/02/11/elderly.robber.ap/index.html");
should help
 
E

ehm

Martin,

Thanks for the response. Your solution worked perfectly.

Regarding the double post, I have two separate accounts created at
two different times. I posted the original question on another
newsgroup on 6 Feb, but hadn't gotten any responses after 7 Feb. I
then posted on this newsgroup for three separate reasons:
1. Second set of eyes.
2. I noticed that Richard Cornford had had a similar problem awhile
back.
3. I had waited four days for a response on the other newsgroup
without any other responses.

Sorry for the breach of newsgroup etiquette, but I thought that I
had waited lnog enough for a response from the other group. Once
again, thanks for the help.
 
R

Richard Cornford

2. I noticed that Richard Cornford had had a similar
problem awhile back.
<snip>

It wasn't my problem, I was trying to help someone else who had a
similar (probably the same) problem. But at the time I couldn't
re-produced it and the OP then stopped providing feed-back so it was
unresolved.

Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top