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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -