I have a packaged app - whose snippet is below and the form that displays shows ascending date (ascendingSort) and Title as the default items - I'd like to show the Publication Date (availableDate) and the descending date (descendingSort) as the two defaults - how in either Jquery or JavaScript can this be obtained - since this is a packaged app - I have to adjust this code via a secondary function:

<span class="toggleButton modalButtons ascendingSort descendingSort" data-bind="click: $root.sort"></span>
<select class="form-control" data-bind="options: filterParams.sort , optionsText: 'name', optionsValue: 'value', value:filterParams.selectedSort , event:{ change: $root.bindPrograms}"><option value="author">Author </option><option value="availableDate">Publication Date</option><option value="name">Title </option><option value="viewCount">Viewed </option></select>
<option value="author">Author</option>
<option value="availableDate">Publication Date</option>
<option value="name">Title</option>
<option value="viewCount">Viewed</option>
1 Year
Discussion Span
Last Post by Phaelax

Well for one thing, your second SELECT is missing the opening tag around the options.

I'm not exactly sure what you're asking. If you're wanting to just change the default selected option, just add the selected attribute to the option tag.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.