This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
[Originally posted by ngs]

I have a function that accepts single string parameter. Using the post
method, the is no problem with a text string like 'PB & J'. If I create a
hyperlink with the same function and argument, the & is interpreted as
separating arguments. How can I include the & in the text and still have the
function receiving one argument?

i.e. Test Link The function accepts one
argument but the & is separating the characters.
import-bot (20211) [Avatar] Offline
#2
Re: using & in a hyperlink
[Originally posted by johnlatham]

> I have a function that accepts single string parameter. Using the post
> method, the is no problem with a text string like 'PB & J'. If I create a
> hyperlink with the same function and argument, the & is interpreted as
> separating arguments. How can I include the & in the text and still have the
> function receiving one argument?
>
> i.e. Test Link The function accepts one
> argument but the & is separating the characters.
I don't think you can keep the & in a hyperlink, precisely for the reason
you've given (it is used to seperate arguments). If you desperately want to
pass '&' as part of an argument you could try using a form,
<form method=post action=of_Temp><input type=hidden name=as_arg1 value="PB & J">
<input type=submit name="button" value="Test Link"></form>. I havn't tried
this (I try to avoid &'s) but it's worth a go.
import-bot (20211) [Avatar] Offline
#3
Re: using &amp; in a hyperlink
[Originally posted by ezad1]

I'm surprised that the spaces don't cause a problem as well. You can use an
"%" escape to code "&" and " ". I think "&" is a %26 and a space is a %20