473,382 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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>
Jul 20 '05 #1
3 2282


ehm wrote:
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

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
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.
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

Jul 20 '05 #3
"ehm" <ka****@earthlink.net> wrote in message
news:26**************************@posting.google.c om...
<snip>
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.
Jul 20 '05 #4

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

Similar topics

11
by: jfranchino0000 | last post by:
this is the code: print("change_text(\"english\",\"$myrow\")>"); change_text(id,text) is a javascript function that changes some of the text on the page to something else. $myrow returns a...
2
by: MistralZ | last post by:
Hi all! I am using Oracle XML parser ver 9.0.1.0.0 for C++ and I am having a strange problem with quotes. Parser throws a parsing error when trying to parse attributes containing quotes (even...
0
by: SKC | last post by:
What I did before problem occured? Ans : When I REVOKE teh EXECUTE from a STORED PROCS called (SP1). and then re GRANTED the EXECUTE permission to SP1. SP1 is a SQL procedure on version 8 UDB....
1
by: Shapper | last post by:
Hello, I am accessing a value in a XML value: news.Load(Server.MapPath("xml/ news.rss")) newslabel.Text = CType(news.SelectSingleNode("rss version=&quot;2.0 &quot;/channel/title").InnerText, String) ...
5
by: comshiva | last post by:
Hi all, I have converted my existing ASP.NET project from 1.1 to 2.0 and i have found that everything works fine except the linkbutton control in my datagrid which throws an javascript error when...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
1
by: Code Monkey | last post by:
I've got a site using master pages. The problem is that although every supposedly is XHTML, the W3C checker is failing on an image button. The code on the generated web page is: <code> <input...
27
by: comp.lang.tcl | last post by:
My TCL proc, XML_GET_ALL_ELEMENT_ATTRS, is supposed to convert an XML file into a TCL list as follows: attr1 {val1} attr2 {val2} ... attrN {valN} This is the TCL code that does this: set...
6
by: comp.lang.php | last post by:
I am trying to pipe in some auto-generated PHP into php.exe, to no avail: catch {exec echo '<? if (@is_file("./functions.inc.php")) { require_once("./functions.inc.php"); echo...
11
by: Lothar Behrens | last post by:
Hi, I have selected strtok to be used in my string replacement function. But I lost the last token, if there is one. This string would be replaced select "name", "vorname", "userid",...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.