I'm writing a string value into a form field in a javascript function that is called from a hyperlink click. The form is submitted to a jsp page. The function is as follows:
function doSubmit(letter, Title)
{
document.forms["SIMPLEFORM"].JSPPAGE.value="ecommerce/jsp/ecguestcatclass.jsp";
document.forms["SIMPLEFORM"].CNAME.value=letter;
document.forms["SIMPLEFORM"].CTITLE.value=Title;
document.forms["SIMPLEFORM"].CWORKFILE.value=parent.parent.G_SESSIONID;
document.forms["SIMPLEFORM"].submit();
return false;
}
Let's say the hyperlink that is clicked calls the function as follows:
doSubmit("A", "The Page Title / Heading");
When I write what's in CTITLE to an html page from within my jsp page as follows:
out.print(request.getParameter("CTITLE"));
It prints the string as "The+Page+Title+%2F+Heading".
Where did the "+"s and the "%2F" come from? How can I get rid of them?
😕
function doSubmit(letter, Title)
{
document.forms["SIMPLEFORM"].JSPPAGE.value="ecommerce/jsp/ecguestcatclass.jsp";
document.forms["SIMPLEFORM"].CNAME.value=letter;
document.forms["SIMPLEFORM"].CTITLE.value=Title;
document.forms["SIMPLEFORM"].CWORKFILE.value=parent.parent.G_SESSIONID;
document.forms["SIMPLEFORM"].submit();
return false;
}
Let's say the hyperlink that is clicked calls the function as follows:
doSubmit("A", "The Page Title / Heading");
When I write what's in CTITLE to an html page from within my jsp page as follows:
out.print(request.getParameter("CTITLE"));
It prints the string as "The+Page+Title+%2F+Heading".
Where did the "+"s and the "%2F" come from? How can I get rid of them?
😕