Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HREF is truncating part of the data?

Status
Not open for further replies.

mmaddox

IS-IT--Management
May 22, 2002
53
US
I Create a list with this query:
SELECT lastname, (lastname+', '+firstname) AS NAME
This results in a name correctly formated as Doe, John

It displays as a hyperlink:
<cfcol header="Name" text="<A HREF=owner.cfm?name=#name#>#name#</a>">

Clicking brings up the owner.cfm page, which gets info from a table in which the name field is a single entry with data as "Doe, John" Not split into first and last name

BUT, the address URL shows "...../owner.cfm?name=Doe," (no quotes)
It truncates at the "space" following the "Doe," so does not find any matching records.

SELECT name
from inventory
where name = '#name#'

Any idea how to get the #name# to carry all the value, not just the part to the left of the space character?

Any help is appreciated
 
You need to URL encode the space for it to work in the link. The browser thinks it's come to the end of the URL when it encounters a vanilla space character.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
I'm not as think as you confused I am.
-----------
Flabbergasted (a.): Amazed at how much weight one has gained.
-----------
Oyster (n.): One who sprinkles their conversation with Yiddish expressions.
 
Thanx philhege, that did it.
(lastname+',%20'+firstname) AS URLNAME
 
Actually, this is probably what philhege meant:
Code:
<A HREF=owner.cfm?name=#UrlEncodedFormat(name)#>#name#</a>




Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Not probably; exactly. I'm slipping in my old age.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
I'm not as think as you confused I am.
-----------
Flabbergasted (a.): Amazed at how much weight one has gained.
-----------
Oyster (n.): One who sprinkles their conversation with Yiddish expressions.
 
Aww, now, I'm sure you've got a few more years before we have to put you in the "Old Programmer's Home".

But I can imagine you sitting on the front porch in a rocking chair saying:
Back in my day, we had to program uphill in the snow...both ways! Barefooted! Then, CF 3.0 came out and we thought it was the greatest thing...

[thumbsup2]



Hope This Helps!

ECAR
ECAR Technologies, LLC

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top