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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing value that contains an ampersand 1

Status
Not open for further replies.

snix1

Programmer
Joined
Dec 12, 2000
Messages
107
Location
US
Hi! My template has a link that passes a parameter to another cf template. The value of the parameter happens to be AT&T. The ampersand causes a problem, as a new parameter is expected. In the template, it comes across at AT. I tried the special ampersand construct of ampersand followed by amp;, but it still didn't work. I also tried some creative placing of quotes, etc., to no avail. Does anyone have any ideas?

Here is a code fragment:

Code:
<cfoutput query=&quot;getit&quot;>
<tr><td><a href=&quot;getinfo.cfm&quot;>state_abbr#</a></td>
    <td><a href=&quot;getvendor.cfm&quot;>#vendor#</a></td>
    <td><a href=&quot;gethardware.cfm?hardware_name=#hardware#&quot;>#hardware#</a></td>
    <td>#software#</td>
</tr>
</cfoutput>

Thanks! :-)
 
Try using the URLencodedFormat()function also you missed a # on the second line.

<cfoutput query=&quot;getit&quot;>
<tr><td><a href=&quot;getinfo.cfm&quot;>#state_abbr#</a></td>
<td><a href=&quot;getvendor.cfm&quot;>#vendor#</a></td>
<td><a href=&quot;gethardware.cfm?hardware_name=#URLencodedFormat(hardware)#&quot;>#hardware#</a></td>
<td>#software#</td>
</tr>
</cfoutput>

Let me know if this works as i havent tried it myself!

Kola
 
Thanks Pigsie!

It worked great...I wonder how I ever missed that one!

Thanks, again!

Susan :-D
 
Please take time to mark posts that are helpful or expert post.

This not only benefits the those who took the time to answer your question, but it also benefits the entire community. It informs others who want to help know that the solution was solved. It also lets those who may run into a similar problem know that this thread was helpful. - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top