Visa ett inlägg
Oläst 2008-10-14, 23:33 #4
Althalos Althalos är inte uppkopplad
Medlem
 
Reg.datum: Jan 2006
Inlägg: 282
Althalos Althalos är inte uppkopplad
Medlem
 
Reg.datum: Jan 2006
Inlägg: 282
Okej, här är först min php-kod:
Kod:
while ($res = mysql_fetch_array($result)) {
 * *echo '<li onclick="fill('.$res[0].');">'. $res[0] .'</li>';
 * *}
Och här är min javascript/jQuery-funktion:

Kod:
function fill(thisValue) {
 * *$('#inputString').val(thisValue);
 * $('#suggestions').hide();
}
Jag kunde inte riktigt lura ut hur jag skulle lägga till ' ' ;/
Althalos är inte uppkopplad   Svara med citatSvara med citat