lfernand
Posts: 19
|
| Posted: 02/08/2008, 10:22 AM |
|
I want to make a simple ajax funtion. Th function should load a dinamic listbox depending on other listbox value.
I began to use AJAX recently .
My knowledge is limited, I'm able to load a select by changing the innerHTML propertie of a block tag like div or span and putting the entire block into a div.I know this technique isn't the better, but for now that's what I'm able to do.
The problem is, Editable Grid is dynamic. So I have to put a select Into a div that repeats and changes the id propertie just like editable grid do with the controls you put in it.
Example
Let's think we have a editable grid with 30 rows. If we have two selects, city and state, we ll have the names:
1st row => city_1,state_1
2st row =>city_2,state_2
...
I just need to add a div that ll encapsulate the city select, just like this:
<div id="div_1">
<select id="city_1">
<option value="">Choose a state</option>
</select>
</div>
<div id="div_2">
<select id="city_2">
<option value="">Choose a state</option>
</select>
</div>
Any idea how can I do this?
|
 |
 |
|