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

How to get the form value if the value have the & symbol inside

Status
Not open for further replies.

dormingo

MIS
Mar 2, 2006
12
MY
Hello buddy, I have a problem of passing the Value in HTML Form to the VB Script function.

Like example: My Text1 value="1234&abc"

when pass the Text1 value to the Function(Text1.value), The Value pass in it will be 1234.
but the actual is 1234&abc. ( Client Side )

How Should I solve this Problem.....? Thank you...
 
It should not be a problem if you mean passing a value of that form ("123&abc") to a client-side function. There is no escaping needed.

If you mean passing it as a name or value of a component of name/vaiue pair of a query string to the server, then you need to urlencode it by as the value part of the name/value pair. If you're sure only & might appear, simply do:
[tt] v=escape("123&abc")[/tt]
But watch out exploding ampersand by multiple pass!

Or I may be missing something.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top