Menu

Solutions to Problems or Custom Needs in a Website

Many solutions we create for one site can be used and appreciated on other sites also.

Have a look at this list of components and solutions we have developed over time and if you could benefit from any of them you are welcome to them.

Please let us know if you would like to discuss the details or would like some help getting one installed.

Mark Buelsing

Set the value of Dropdown with Auto Complete

Use this function to set the value of a dropdown with auto complete

function setAutocompletCurrentValue(id, value) {
   $(id).val(value);
   var textToShow = $(id).find(":selected").text();
   $(id).parent().find("span").find("input").val(textToShow);
}

Called like this:

setAutocompletCurrentValue(dnn843GCSFieldName, 'test');

Notes:

The value you set it to must be a correct choice for the control from its dataset,

Not sure if the single quotes are needed or not.

Print
2569 Rate this article:
No rating
Please login or register to post comments.
RSS
1234