Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
48
rated 0 times [  49] [ 1]  / answers: 1 / hits: 15216  / 14 Years ago, wed, december 22, 2010, 12:00:00
 <select id=facetList style=width:120px; class=text ui-widget-content ui-corner-all>
<?php
foreach($claAddArray as $k => $v)
{
echo <option value=$k>$v</option>;
}
?>
</select>




$(#btnSubmit).click(function() {

var $fId = ?????????????????


});

More From » php

 Answers
29

jQuery's .val() will return the currently selected option's value if run on the select list itself. In your case $(#facetList).val();



use $(#facetList option:selected).text(); for the text of the option tag.


[#94524] Sunday, December 19, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tajo

Total Points: 415
Total Questions: 124
Total Answers: 103

Location: North Korea
Member since Tue, Jun 16, 2020
4 Years ago
;