javascript - jQuery Auto-complete - Force Selection/Testing -
i have simpe jquery autocomplete input box id 'medid'
$('#medid').val("par").focus().keydown();
i use code above put value in box, trigger focus , key down search.
it returns between 1-5 values.
how automaticly select 1 of suggested values?
i have tried:
$('#medid').children()[0].focus().click();
and
$('#medid').children().focus().click();
but suggested auto complete values direct chilren of input box?
this can test part of system without need of user.
i'm not 100% certain, think browsers prohibit this. request might turn out impossible.
if possible, malicious script gain access data users had typed input
fields, e.g. credit card numbers or email addresses, using script 1 outlined. pretty bad security hole.
sorry that. perhaps away looping through input values want test , calling $('#medid').val(testvaluehere)
instead?
Comments
Post a Comment