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 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?

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

Ads