I have a question about autocomplete,I want to change the value of SELECT, will change the remote access to the file, why the error?
<select id='sd'>
<option value ="111">aaa</option>
<option value ="222">bbb</option>
<option value="333">ccc</option>
<option value="444">ddd</option>
</select>
<input type='text' id='mecode'>
<script>
$( function() {
function log( message ) {
$( "<div>" ).text( message ).prependTo( "#log" );
$( "#log" ).scrollTop( 0 );
var file=("#select1 option:selected").val();+'jsp'
$( "#mecode" ).autocomplete({
source: function( request, response ) {
success: function( data ) {
select: function( event, ui ) {
log( "Selected: " + ui.item.value + " aka " + ui.item.id );
</script>
I want to change the value of SELECT, will change the remote access to the file, why the error?