Jump to content

id of selected select box item


The Little Guy

Recommended Posts

How do I get the id of a selected item in a select box?

 

so if AT&T is selected, how do I get the id: att

			<select id="mPhone">
			<option id="none">Select A Provider...</option>
			<option id="att">AT&T</option>
			<option id="alltel">Alltel</option>
			<option id="boostMobile">Boost Mobile</option>
			<option id="Cingular">Cingular</option>
			<option id="cti">CTI</option>
			<option id="nextel">Nextel</option>
			<option id="sprint">Sprint</option>
			<option id="tMobile">T-Mobile</option>
			<option id="verizon">Verizon</option>
			<option id="verginMobile">Virgin Mobile</option>
		</select>

Link to comment
https://forums.phpfreaks.com/topic/120150-id-of-selected-select-box-item/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.