I have created a select input via a Ajax request and it works perfectly, the result using Firebug is:
<select id="ANTIREFLEXO" class="xlarge" name="ANTIREFLEXO">
<option value="1_ANTI REFLEXO EASY CLEAN">ANTI REFLEXO EASY CLEAN</option>
<option value="2_ANTI REFLEXO CRIZAL EASY">ANTI REFLEXO CRIZAL EASY</option>
<option value="3_ANTI REFLEXO CRIZAL ALIZE PLUS">ANTI REFLEXO CRIZAL ALIZE PLUS</option>
<option value="4_ANTI REFLEXO CRIZAL FORTE">ANTI REFLEXO CRIZAL FORTE</option>
<option value="5_ANTI REFLEXO CLEAN EXTRA">ANTI REFLEXO CLEAN EXTRA</option>
<option value="6_ANTI REFLEXO NO RISK">ANTI REFLEXO NO RISK</option>
<option value="7_ANTI RISCO">ANTI RISCO</option>
<option value="8_BLUE BLOCK">BLUE BLOCK</option>
</select>
The thing is that I’m not finding a way to receive ANTIREFLEXOs selected value.
My PHP, using CodeIgniter is like this:
$tratamento = $this->input->post("ANTIREFLEXO");
And it is always NULL
The select input generated depends on other option from another select input component. If the user selects the option “ANTI REFLEXO”, I’ll have to load this new select input with those values.
What am I doing wrong?
Thanks in advance for any help.
I’ve found a solution for that..
I was creating the select on PHP and adding it on the HTML via Ajax but I have created the select on the HTML and just added the options via Ajax and it worked perfectly:
Hope it helps =)