01-11-2009, 04:31 PM
|
#8 (permalink)
|
|
The Visitor
Join Date: Jan 2009
Posts: 2
Thanks: 1
|
i get data if i use this in the page..
Code:
$get = mysql_query("SELECT * FROM my_table")or die(mysql_error());
while($r = mysql_fetch_array($get))
{
echo "'$r[my_column]',";
}
 but when i use this code in the following way as your example i dont get anything..
Code:
echo "<script type=\"text/javascript\">";
echo "new Autocompleter.Local('bands_from_the_70s', 'client_list',[";
$get = mysql_query("SELECT * FROM hyc_client")or die(mysql_error());
while($r = mysql_fetch_array($get))
{
echo "'$r[hyc_client_name]',";
}
echo "'No Client'],{}";
echo "); \n</script>";
i put all javascript files as u described in the same folder where this page resides and use the following line to get those javascript reference.
Code:
<script src="prototype.js" type="text/javascript"></script>
<script src="scriptaculous.js" type="text/javascript"></script>
and i also just copy/paste your code as bellow in my page...
Code:
<label for="bands_from_the_70s"></label>
<form name="form1" method="post" action="">
<label for="bands_from_the_70s"></label>
<input name="text" type="text" id="bands_from_the_70s" value="" size="15" autocomplete="off" />
</p>
<label></label>
<input name="Go" type="submit" id="Go" value="Go">
</form>
<div class="page_name_auto_complete" id="client_list"></div>
pls tell me where is my fault or what should i do to get the autosuggest option.....
|
|
|
|