11-29-2010, 12:00 AM
[eluser]diasansley[/eluser]
below is my view code i wanted to add a script that directly takes the select value when u select an option from the drop down without using the submit button.
thanks rgds
below is my view code i wanted to add a script that directly takes the select value when u select an option from the drop down without using the submit button.
Code:
<li class="brands_dropdown">
<h4 class="h4">Marken</h4>
<?= form_open('entries/showAllEntries');?>
<select name="brands" id="brands" class="lisbox">
<option value="0">--Select--</option>
<?php
foreach($brands as $brand):
if(isset($type) && $type == 'brand')
$selected = ($brand['id']==$type_id)? 'selected = "selected"' : '';
else
$selected='';
?>
<option value="<?=$brand['id'];?>" <?=$selected;?>><?=$brand['name']?></option>
<?php endforeach;?>
</select>
<input type="hidden" value="brand" id="entry_type0" name="entry_type" />
<input type="submit" value="Submit" />
<?=anchor('brands/showAllBrands', 'alle Marken', array('id'=>'all_brands_link'));?>
<?= form_close();?>
</li>
thanks rgds