Hi there everyone, just started fiddling around with AJAX.
Am using ajaxtoolbox.
Two files:
testajax.php [contains a selectbox with ID: TESTCOMBO
<select id="testcombo" size="10">
<option value='nothinghereyet'>nothing here yet</option>
</select>
options.php [file that ajax "GETS"]
<option value ='1'> Hahaha1! </option>
<option value ='1'> Hahaha2! </option>
<option value ='1'> Hahaha3! </option>
I then used ajaxtols to GET options.php,
and fill the innerhtml of "testcombo" with the responsetext of 'options.php'.
The result is that i get a screwed up combobox.
All the 3 options appear as are a single option, and i can't even select it.
Why doesnt this work?
The only way i manage to get it to work, was to wrap the ENTIRE selectbox in a container div, and then fill the innerhtml of this div with a full selectbox code (not just the options as i did earlier).
Anyone can explain why this happens?
Thanks!
Am using ajaxtoolbox.
Two files:
testajax.php [contains a selectbox with ID: TESTCOMBO
<select id="testcombo" size="10">
<option value='nothinghereyet'>nothing here yet</option>
</select>
options.php [file that ajax "GETS"]
<option value ='1'> Hahaha1! </option>
<option value ='1'> Hahaha2! </option>
<option value ='1'> Hahaha3! </option>
I then used ajaxtols to GET options.php,
and fill the innerhtml of "testcombo" with the responsetext of 'options.php'.
The result is that i get a screwed up combobox.
All the 3 options appear as are a single option, and i can't even select it.
Why doesnt this work?
The only way i manage to get it to work, was to wrap the ENTIRE selectbox in a container div, and then fill the innerhtml of this div with a full selectbox code (not just the options as i did earlier).
Anyone can explain why this happens?
Thanks!