Need Help

#1
[eluser]phpfresher[/eluser]
I need the following output:
<select name = "XXX" id="XXX" class="xxx">
<option value="">XXX</option>
<option value="">XXX</option>
</select>
Here is my code:
&lt;?php
$js = 'id="module_id"';
echo form_dropdown('module_id',$list_of_module,$js);
?&gt;
And this code outputs only :
<select name = "module_id" >
<option value="">XXX</option>
<option value="">XXX</option>
</select>

How can i insert id into select box or drop down box need help

#2
[eluser]Sudz[/eluser]
Put $js as a fourth parameter in form_dropdown() as shown below.
3rd parameter is a default value you want to be selected on form load.

Code:
$js = 'id=“module_id”';
echo form_dropdown(‘module_id’,$list_of_module,'0',$js);


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.