I am reading the value of a control on a form and concatenating it to a querystring. How should I encode it so that if the string contains special characters or quotation marks etc it does not get truncated or fall over?
function whatever()
{
var UsersReason = formname.fieldname.value
location.replace('Somepage.htm?Reason=' + UsersReason
}
What should I put round the UsersReason variable to make sure it makes it to the server without being affected. Thanks for any answers.
function whatever()
{
var UsersReason = formname.fieldname.value
location.replace('Somepage.htm?Reason=' + UsersReason
}
What should I put round the UsersReason variable to make sure it makes it to the server without being affected. Thanks for any answers.