/    Sign up×
Community /Pin to ProfileBookmark

Autocomplete Problem

Hi,

I have a auto complete script, scrolling works fine in all the browsers except IE. When i place the cursor to scroll it disappears not sure what is the problem. Any suggestions pls ?

[B]Here is my code[/B]

<html>
<head></head>
<title></title>
<script type=”text/javascript” src=”javascripts/prototype.js”></script>
<script type=”text/javascript” src=”javascripts/effects.js”></script>
<script type=”text/javascript” src=”javascripts/controls.js”></script>

<body >

<form method=”post” action=”search_action.php” name=”form1″ >
<table width=”100%” border=”0″ >

<tr >
<td >Enter<input type=”text” name=”pname” id=”pname” >
<div id=”hint”></div></td>
</tr>

<tr>
<td> <input type=”submit” name=”btn_submit1″ id=”btn_submit1″ >
</td>
</tr>
</table>
</form>

</body>
<script type=”text/javascript”>
new Ajax.Autocompleter(“pname”,”hint”,”server.php”);

</script>

</html>

[B]server.php[/B]

[code=php]<?php
include “config.php”;
if(isset($_POST[‘pname’]))
{
$sql = “SELECT quality_description,id FROM jos_details WHERE quality_description LIKE ‘%$_POST[pname]%’ group by quality_description”;
}
else
{
$sql = “SELECT quality_description,id FROM jos_details WHERE quality_description LIKE ‘$_POST[pname]%’ group by quality_description”;

}

$rs = mysql_query($sql) or die(mysql_error());

?>

<ul style=”height:380px; width:200px;overflow:scroll;”>

<? while($data = mysql_fetch_assoc($rs)) { ?>
<li style=”border:1px medium #666666;”><? echo stripslashes($data[‘quality_description’]);?></li>
<? } ?>

</ul>[/code]

[upl-file uuid=7264d18c-9685-4063-8d29-6df8cfb5d459 size=29kB]javascripts.zip[/upl-file]

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @kavionly spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...