Please look at the following code
mydiv1.innerHTML=mydiv1.innerHTML + '<label>*Functional Area:<span class="small">Enter Company Name</span></label><input type="text" name="FunctionalArea_"'+counter1+' id="company" /><label class="spacing">*Experience:<span class="small">Number of years</span></label><select name="Exp_In_FA_"'+ counter1 +' id="experience"><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>morethan 5</option</select><input type="button" value="Add" id="bt1" onclick="generate()" style="font-size:8pt;height:25px;width:55px"/>'
Now the above javascript code is called properly and new elements get embedded at the desired location. But the problem is that when these values are passed to servlet, i am unable to retrieve Exp_In_FA_0 by using request.getParameter("Exp_In_FA_0"). It simply returns NULL. Please correct me where i am doing wrong? Sorry that i am unable to post the code in multiple lines. The code tag takes everything in single line only
name="FunctionalArea_"'+counter1+'should bename="FunctionalArea_'+counter1+'"