I am using Jquery Token-Input for autosearch field. I need to send PropertyToSearch field value dynamically.
HTML:
<input checked="checked" name="suggest" type="radio" />Month
<input name="suggest" type="radio" />Day</label>
As in the above html fields.
When i select Month, the list should be listed as Months and When i select Day, the list should be listed as week days.
Now i am passing propertyToSearch in default like below,
SCRIPT:
$("#demo").tokenInput(../Management/getDaysAndMonths,
{
propertyToSearch: "Month",
tokenLimit: 1
});
How i need to set propertyToSearch field value dynamically. so that it can switch the listed values based on the selected radio button field.
please clarify me through suggestions.
thanks in Advance.
I got a solution.
Instead of changing the propertyToSearch. I simply changed the code behind to list the values based on the input provided.
So, if month is selected. I pass a parameter "searchProperty" in url as month and if day has been selected I pass a parameter as day based on the searchProperty value. I list the values and pass it on the dropdown list.
$("#demo").tokenInput("../Management/getDaysAndMonths?searchProperty="+$('input[name="suggest"]').val(),
{
//code
});