in reply to Re: Call Perl script from Javascript
in thread Call Perl script from Javascript

To see what you are getting back from your script add an alert() to your javascript:
$.get("suggest.pl", {word: $(this).val()}, function(data){ alert(data); $("#myWord").empty(); $("#myWord").html(data); });
You say earlier that you already have the script that deals with the db, so instead of the echo in PHP you just need print in Perl, something like:
print $q->header; while (my $row = $sth->fetchrow_hashref) { my $word = $row->{'crps_word'}; my $prob = $row->{'crps_probability'}; my $str = $prob."----".$word; print qq|<option value="$word">$str</option>|; }