Welcome Guest, Not a member yet? Register   Sign In
n/a Change values in one list box based on selection in another
#1

[eluser]shades[/eluser]
I have this in my html view
<div class="field">
<label for="type">Brand </label>
<select name="category_id" id="category_id" class="medium">
<optgroup label="Brand Avilable">
<option value="null" selected="selected">Choose Category</option>
&lt;?php foreach($brandList->result() as $row): ?&gt;
<option value="&lt;?=$row->id;?&gt;">&lt;?=$row->name;?&gt;</option>
&lt;?php endforeach; ?&gt;
</optgroup>
</select>
</div>
<div class="field">
<label for="type">Category </label>
<select name="category_id" id="category_id" class="medium">
<optgroup label="Category Avilable">
<option value="null" selected="selected">Choose Category</option>
&lt;?php foreach($categoryList->result() as $row): ?&gt;
<option value="&lt;?=$row->id;?&gt;">&lt;?=$row->name;?&gt;</option>
&lt;?php endforeach; ?&gt;

</optgroup>
</select>
</div>


now i want to list only the category of selected brand from brand list

the category table have foreign key or brand id in it


Messages In This Thread
n/a Change values in one list box based on selection in another - by El Forum - 12-29-2010, 10:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB