Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet HTMLEncode and HTMLDecode

Have Programming Question? Ask it here!
 
 
 


Paritosh Das
HTMLEncode and HTMLDecode
0 Answer(s)      2 years and 3 months ago
Posted in : JSP-Servlet


Sir I need your help...

Suppose there are 2 dropdownlists in my page. Firstly, I fill the first one with values from database using ajax. There is a field (say code) in the database that contains values with some special characters (e.g ten&five>four) and I've set this field as the value of

<'select id="xx" onchange="ajaxFillDdl2()">

<'option value="ten&five>four">Volvo<'/option>

<'option value="saab&mercedes">Saab<'/option>

<'/select>

In this case, & and > of ten&five>four is being encoded as ten& ;five> ;four.

So in the servlet whenever I am writing String searchID=request.getParameter("xx") it's giving me ten as a value of searchID instead of ten&five>four

Hence obviously,the query "SELECT YY , ZZ FROM tblABC WHERE code="+searchID; will not give values to fill 2nd dropdownlist.

How can I solve this?


Advertisement
View Answers

Related Tutorials/Questions & Answers:
HTMLEncode and HTMLDecode
HTMLEncode and HTMLDecode   Sir I need your help... Suppose there are 2 dropdownlists in my page. Firstly, I fill the first one with values from database using ajax. There is a field (say code) in the database that contains
HTMLEncode and HTMLDecode
HTMLEncode and HTMLDecode   Sir I need your help... Suppose there are 2 dropdownlists in my page. Firstly, I fill the first one with values from database using ajax. There is a field (say code) in the database that contains
Advertisements
HTMLEncode and HTMLDecode
HTMLEncode and HTMLDecode   Sir I need your help... Suppose there are 2 dropdownlists in my page. Firstly, I fill the first one with values from database using ajax. There is a field (say code) in the database that contains
 

 

 

DMCA.com