I think I have gotten to the bottom of this. The reason why you are not seeing any characters after the space in “IBM Services” is because the variable must be URL-encoded. Your browser (and everybody else’s) will interpret the " " as the end of the variable.
You can verify this by doing a “View Source…” from DSP Page 1. You will see the following: <A HREF="/Company/Transactions.dsp?name=200&user=IBM Services" TARGET="_top">
- Add a form to your code right below your <BODY> tag:
<FORM ACTION = “/Company/Transactions.dsp” METHOD = “POST” NAME = “thisForm”>
<INPUT TYPE = “HIDDEN” NAME = “name”>
<INPUT TYPE = “HIDDEN” NAME = “user”>
We have now replaced your <A> tag with a <FORM> whose values we will populate when the form is submitted. Also, a form submitted via POST has the ENCTYPE attribute of application/x-www-form-urlencoded by default.
- Change your <A> tag to read:
<A HREF="#" TARGET="_top" onClick = “document.thisForm.name.value=’%value COMPANY_CODE%’; document.thisForm.user.value=’%value USERNAME%’; document.thisForm.submit();”>
Now, when a user selects a link from DSP Page 1, it will populate the HIDDEN values of the FORM and then submit the form as a POST to DSP Page 2.