I'm adding an hidden input as something in a select is choosen, using the onchange event with some jsp vars. I add some text to the div I'm working on but there are too many quotes and double quotes so I don't understand how to do it. Does anyone have any idea?
<select name="opt_name%>" onchange="$('#dati_opzioni').append('<input type="hidden" name="optdesc_'+<%=opt.getCdOpzione()%>+'" value="'+<%=optLabel%>+'_'+this.options[this.selectedIndex].text+'"/>');">