hi there,
I hva a dsp page which displays all records say
code,companyname in a table, now when i click particaular
code it shld take me to another dsp showing the current record
in two text boxes.I could do that but when am passing companyname as “IBM SERVICES” its only displaying “IBM”
why am not getting “SERVICES DISPLAYED”.is there any
function or method in dsp to handle this…
the code for DSP page1 and Page2 are as below when i
click on the hyperlink of data in table it takes me to second dsp
page where i should edit these values but am not able to
see the company name ie say if i click on code 200 with
comapnyname:“IBM SERVICES” I cld only able to view
“IBM” but not SERVICES ie if i give any space between the comapany name this probelm raises.How to handle this situation?
pls help me out
++++++++++++++++++++++++++++++
Dsp Page1
function checkPw(form)
{
var formValues=document.form.USERNAME.value+“%”
alert(formValues);
}
%invoke ncbCompany:selectCompany%
<CENTER>
THE DETAILS OF THE COMPANY CODES ARE:
COMPANY CODE
USER NAME
%loop results%
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”>
So, we need to eliminate that space character. Here is one possible solution for you that uses forms and JavaScript and does not require any modifcation to your Flow.
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”>
</FORM>
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.