selected

get seleceted dropdown option value jquery

醉酒当歌 提交于 2019-12-12 03:04:30
问题 I have two dropdowns -- for the month and year -- and a button. When the user clicks the button, I want to grab the selected month value and year value and pass them as query string to a URL like this: https://mysite.com/events.aspx?my=may2012 . How do I grab those values using jQuery or Javascript? <div id="datepicker"></div> <div class="calendForm"> <span class="inpMonth"> <select> <option selected="selected">September</option> <option>August</option> <option>July</option> <option>June<

How do I use Javascript to Select Audio File from Button Value

雨燕双飞 提交于 2019-12-12 02:40:02
问题 So I have an array of buttons all with different values and I want them play the song with it's number value, when clicked. All of the files are numbered, i.e. 1.mp3, 2.mp3, 3.mp3, etc. Is there a way of doing it without a lot of repeating Javascript code for each song. Here is my HTML: <audio id="player"> <source id="sourceMp3" src="" type="audio/mp3"> Your browser does not support the audio element. </audio> <button onclick="loadSong()" value="1">1</button> <button onclick="loadSong()"

How can I change selected item's background color in Windows Phone?

血红的双手。 提交于 2019-12-11 15:01:51
问题 How can I change selected item's background color that in listbox which has datatemplate in Windows Phone? I have seen that it can be with Setter Properties. Where I will write them? Thanks. Code <ListBox x:Name="listLocs" HorizontalAlignment="Left" Height="605" VerticalAlignment="Top" Width="250" SelectionChanged="listLocs_SelectionChanged" Margin="10,155,0,0" BorderBrush="#FF030042" BorderThickness="2" Foreground="#FF030042"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation=

Detecting Which item was Selected From a ListView

点点圈 提交于 2019-12-11 13:10:06
问题 I am trying to get the title of the song that was selected from my listview but I'm getting a forced close. Any ideas? ArrayList<String>songtitle = new ArrayList<String>(); //This is how i popluated sontitle// ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,R.layout.song,songtitle); setListAdapter(adapter); protected void onListIemClick(ListView , View v, int position, long id){ super.onListItemClick(c, v, position, id); Object o = this.getListAdapter().getItem(position); String

how to highlight selected jquery ui tab?

百般思念 提交于 2019-12-11 04:23:42
问题 I've learned how to create a jquery ui tab, thanks to http://jqueryui.com/tabs, and customized the look of it. I've been searching the web on how to highlight a selected tab by changing it's background color when someone clicks on it. So far, it's been frustrated and unsuccessful. Here's the HTML Code Use: <!DOCTYPE html> <head> <link href="style.css" rel="stylesheet" type="text/css" > <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>

MagicSuggest - set magic suggest list with pre selected items

我与影子孤独终老i 提交于 2019-12-10 17:17:47
问题 I am using MagicSuggest to populate tag list from following JSON data: {"Id":"money","name":"money"},{"Id":"education","name":"education"}] while I am going to edit page, need to pre-populate the selected tags:- like one pre-populated tag: money Please suggest how I can set magic suggest list with pre selected items Below code is the one which I have tried so far : var article_tags = $('#article_tags').magicSuggest({ data: 'http://localhost:1043/Tag/TagData', sortOrder: 'name', valueField:

Yii2 dropDownList mark option selected

女生的网名这么多〃 提交于 2019-12-10 10:18:06
问题 Hi i'm trying to make a drop down list with selected value but there is still no progress, drop down is rendenering but always first option is selected. $company_id = (int) $params['company_id']; $options = [ 'options' => [ $company_id => [ 'selected' => 'selected', 'label' => 'test' ] ] ]; echo $form->field($model, 'company_id')->dropDownList($companies_list, $options); whats wrong with that code? I edited my code and i set 'label' => 'test' in my option, and this works, but selected still

How to keep an item selected? - ListView

烈酒焚心 提交于 2019-12-10 00:26:44
问题 I would like to keep an item selected, on a ListView, when the user clicks on a space which has no item. For example, the space below the items, but still on the ListView component. I've change the ListView property "HideSelection" to false, but that only works when the focus is changed to another component; not when the user clicks on the ListView itself. Thanks! 回答1: This is something you normally shouldn't fix. The user clicked somewhere intentionally, that might well be because she wanted

yii method to disable selected options from multi select dropdown

妖精的绣舞 提交于 2019-12-08 05:34:15
问题 I am using yii dropdown with active records in that i am using multiselect dropdown. i am creating data with in which i am selected multiple option from dropdown.. while updating i want to disable selected option which i selected at time of creation. <code> <?php $savedSections = helpers::getQuestionnaireSectionList($model->questionnaire_id); $data = helpers::getSection(); $listData = CHtml::listData($data, 'section_id', 'section_name'); $htmlOptions = array('size' => '5', 'multiple' => 'true

Delphi TStringGrid multi select, determining selected rows

一个人想着一个人 提交于 2019-12-07 14:16:35
问题 Is there anyway to determine which rows are currently selected in a multi-select TStringGrid , or a TCustomGrid for that matter. A property would be ideal. I know that there is the gdSelected property that gets set in the DrawCell event, procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); I can check AState for gdSelected , and keep track of this in an array somewhere, but this seems kludgey. 回答1: I guess you are talking about a range-select string grid, that is, a