Welcome Guest, Not a member yet? Register   Sign In
on drop down selection
#1

[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.



Code:
<li class="brands_dropdown">
        <h4 class="h4">Marken</h4>
        &lt;?= form_open('entries/showAllEntries');?&gt;
            <select name="brands" id="brands" class="lisbox">
                <option value="0">--Select--</option>  
                &lt;?php
                      foreach($brands as $brand):
                          if(isset($type) && $type == 'brand')
                             $selected = ($brand['id']==$type_id)? 'selected = "selected"' : '';
                          else
                              $selected='';
                 ?&gt;        
                    <option  value="&lt;?=$brand['id'];?&gt;" &lt;?=$selected;?&gt;>&lt;?=$brand['name']?&gt;</option>  
                &lt;?php endforeach;?&gt;    
             </select>
             &lt;input type="hidden" value="brand" id="entry_type0" name="entry_type" /&gt;
             &lt;input type="submit" value="Submit" /&gt;
             &lt;?=anchor('brands/showAllBrands', 'alle Marken', array('id'=>'all_brands_link'));?&gt;
         &lt;?= form_close();?&gt;
    </li>


thanks rgds


Messages In This Thread
on drop down selection - by El Forum - 11-29-2010, 12:00 AM
on drop down selection - by El Forum - 11-29-2010, 03:25 AM
on drop down selection - by El Forum - 11-29-2010, 03:56 AM
on drop down selection - by El Forum - 11-29-2010, 03:59 AM
on drop down selection - by El Forum - 11-29-2010, 04:15 AM
on drop down selection - by El Forum - 11-29-2010, 04:43 AM
on drop down selection - by El Forum - 11-29-2010, 05:18 AM
on drop down selection - by El Forum - 11-29-2010, 05:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB