I have got basic AJAX routines working from Basic Ajax Routine page.
http://www.dynamicdrive.com/dynamici...jaxroutine.htm
This stuff is a bit tricky at first, but I am starting to get the hang of it...
Now I am trying to generate a second AJAX reponse based on first selection. for example: Select Continent-> Select Country ->Select State.
However I am having trouble getting browser to respond to onChange event generated by Ajax response.
Am I hitting some limitation of Ajax? Can anyone provide code or some tips here?
Forgive me if my question is not very clear, however this example may make it more clear.
ref: http://tinyurl.com/h3rdh
code for AJAX Response 1
------------------------
Content-type: text/html
What Country are you from?
</td><td>
<AS400>CountrySection1
<SELECT NAME="SelectCountryName"
onChange="var poststr=createpoststring2();
ajaxpack.postAjaxRequest('/mycgilibp/ajax12.pgm',
poststr, processGetPost2, 'txt');
return false">
<AS400>CountrySection2
<option value="/%CountryName%/" >/%CountryName%/ </option>
<AS400>CountrySection3
</select>
code for AJAX Response 2
------------------------
Content-type: text/html
</td><td>
<AS400>ProvSection1
What State/Province are you from?
<SELECT NAME="SelectProvName" >
<AS400>ProvSection2
<option value="/%ProvName%/" >/%ProvName%/ </option>
<AS400>ProvSection3
</select>



Reply With Quote

Bookmarks