i am having a problem where i want to give user an option to select more entry from one dropdown...example :

<form name="form1" method="post" action="">
<label>
<select name="service" id="service">
<option value="service1">service 1</option>
<option value="service2">service2</option>
<option value="service3">service3</option>
<option value="service4">service 4</option>
<option value="service5">srvice5</option>
<option value="service6">service 6</option>
</select>
</label>
</form>

in this case, i want to select service 3, service 4, service 5 and service 6...

i dont know how to create a javascript function for this...can u guys help me with my problem... :)

Hi,

Just Add

multiple="multiple"

in Select tag and you can select multiple selections in it

and for make more easy to select more options

add

size="4"

now your code should look like this

<form name="form1" method="post" action="">
<label>
<select name="service" id="service" multiple="multiple" size="4">
<option value="service1">service 1</option>
<option value="service2">service2</option>
<option value="service3">service3</option>
<option value="service4">service 4</option>
<option value="service5">srvice5</option>
<option value="service6">service 6</option>
</select>
</label>
</form>

I Hope, this will help you
Thanks,
Rahul Dev Katarey

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.