473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Autoassist scripts?

Hi, can anyone recommend a free autoassist script for populating form boxes
from my database whilst typing? The capxous went to paid software, and I'm
looking for an alternative. I have googled but not found anything as an
alternative. I am programming with MySQL and PHP.

Thanks
Feb 27 '07 #1
3 1471
On 27 Feb, 13:16, "elyob" <newsprof...@gmail.comwrote:
Hi, can anyone recommend a free autoassist script for populating form boxes
from my database whilst typing? The capxous went to paid software, and I'm
looking for an alternative. I have googled but not found anything as an
alternative. I am programming with MySQL and PHP.

Thanks

Scriptaculous (ruby on rails)
demo: http://wiki.script.aculo.us/scriptaculous/show/Demos
jQuery
site: http://jquery.com/

you might find Sc. easier to deal with than jq.
Feb 27 '07 #2

"shimmyshack" <ma********@gmail.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
On 27 Feb, 13:16, "elyob" <newsprof...@gmail.comwrote:
>Hi, can anyone recommend a free autoassist script for populating form
boxes
from my database whilst typing? The capxous went to paid software, and
I'm
looking for an alternative. I have googled but not found anything as an
alternative. I am programming with MySQL and PHP.

Thanks


Scriptaculous (ruby on rails)
demo: http://wiki.script.aculo.us/scriptaculous/show/Demos
jQuery
site: http://jquery.com/

you might find Sc. easier to deal with than jq.
Thanks for that ... quite a bit or learning on both!
Feb 27 '07 #3
On 27 Feb, 14:58, "elyob" <newsprof...@gmail.comwrote:
"shimmyshack" <matt.fa...@gmail.comwrote in message

news:11*********************@v33g2000cwv.googlegro ups.com...
On 27 Feb, 13:16, "elyob" <newsprof...@gmail.comwrote:
Hi, can anyone recommend a free autoassist script for populating form
boxes
from my database whilst typing? The capxous went to paid software, and
I'm
looking for an alternative. I have googled but not found anything as an
alternative. I am programming with MySQL and PHP.
Thanks
Scriptaculous (ruby on rails)
demo:http://wiki.script.aculo.us/scriptaculous/show/Demos
jQuery
site:http://jquery.com/
you might find Sc. easier to deal with than jq.

Thanks for that ... quite a bit or learning on both!
Heres a simple example for scriptaculous to get you started. It might
work, but I'm typing in a small textarea so sorry if it needs a quick
fix.

html----demo.html--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="scriptaculous.js" type="text/javascript"></script>
<script type="text/javascript">
function auto()
{
new Ajax.Autocompleter('text', 'text_auto_complete', 'text.php', {});
}
</script>
<link href="styles.css" type="text/css" rel="stylesheet" />
</head>
<body onload="auto();">
<!--note the action can be blank, the data will comes from text.php-->
<form action="" method="post">
<div style="display: none;" class="auto_complete"
id="text_auto_complete"></div>
<label for="text" class="ltf">Title</label>
<input id="text" name="text" title="enter the text" class="tf" />
<input type="hidden" value="yes" id="submit" name="submit" />
<input type="reset" value="reset form" name="clear" class="warning"
onclick="return confirm('Are you sure?\nThis will reset the form!');" /
>
</form></body></html>
php-------text.php---
<?php
function cleanup($searchstring)
{
//mysql_real_escape_string( )
$searchstring = eregi_replace("([^a-zA-Z ])",'',$searchstring);
if( trim($searchstring)=='' )
{
return '';
}
else
{
return $searchstring;
}
}

function strAjaxBackToBrowser( $strInput )
{
$strInput = cleanup( $strInput );
$strResults = '';
$eol = "\n";
//$arrData = array();
//$count = 0;
//include db connection stuff
//connect to db, retrieve rows,
//$data = mysql_query($query, $search) or die(mysql_error());
//if(mysql_num_rows($data)==0)
//{
// $strResults .= '<li>Nothing for ' . $strInput . '</li>' . $eol;
//}
//else
//{
// while($arrData[$count] = mysql_fetch_array($data))
// {
// $column1 = ucwords(strtolower($arrData[$count]['column1']));
// $column2 = ucwords(strtolower($arrData[$count]['column2']));
// $strResults .= '<li>' . htmlentities($column1) . ', (' .
htmlentities($column2) . ')</li>' . $eol;
// $count++;
// }
//}
//mysql_close();
//mysql_free_result($data);
$strResults .= '<li>row 1, click me</li. $eol';
$strResults .= '<li>row 2, click or arrow select</li>' . $eol;
$strResults .= '<li>row 3, similar sort of thing</li>' . $eol;
header( 'Content-Type: application/xml; charset=utf-8' );
return '<' . '?xml version="1.0" encoding="utf-8" ?><ul>' .
$strResults . '</ul>';
}

echo function strAjaxBackToBrowser( $_POST['text'] );
exit;
?>

hope it helps. You can use DOM methods to insert the required div
above the fields and even the javascript, which could otherwise become
an annoying thing to have to do repeatedly each time you make a form,
unless you use php to do it, it also clutters the markup which is
against the principle of unobtrusive js. Also if the user agent doesnt
require javascript it doesnt make sense to do all that messing up of
the DOM.

YMMV with the above good luck.

Feb 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jeff Wagner | last post by:
I have a project of converting numerous DOS cmd shell scripts to Python. Is there a tutorial to getting started? Thanks, Jeff
2
by: RJ | last post by:
We currently send product releases to our customers, and often have to include scripts that need to be ran on the Oracle databases (also do it for SqlServer customers, but we use a different set of...
7
by: ergobob | last post by:
Hello, I have two small PHP scripts running on a test page at: http://www.usernomics.com/ergonomic-products-accessories5.html Both scripts work perfectly when there is one script on a page....
8
by: Mike Nau | last post by:
We currently have all of our schema and testdata laid out in a large set of sql scripts. It currently takes about 15 minutes to run the scripts on a Dual 1.7ghz box with 1gb of ram. Does...
1
by: Cheng Guangnan | last post by:
<a href="http://capxous.com/autoassist/">AutoAssist 0.6.5</a> What? Ajax autocomplete widget on web pages, the way to archive effective and comfortable. And it is pure JavaScript so will not...
2
by: chenggn | last post by:
AutoAssist is a AJAX auto complete component that writing AJAX features like Google Suggest easy for developers who don't speak browser quirks as a second language. (http://capxous.com/) For a...
1
by: ponsibabu | last post by:
We have several scripts for sale. We are selling them at reasonable prices and willing to work around your budget. For more information please contact totascriptz@yahoo.com with "Scripts" as...
8
by: Alan Isaac | last post by:
Suppose I have a directory `scripts`. I'd like the scripts to have access to a package that is not "installed", i.e., it is not on sys.path. On this list, various people have described a variety...
3
by: shapper | last post by:
Hello, I am working on a web site where I have a master page. Most web site pages use this master page as base. Some scripts are used in all pages ... other just in a few pages. Should I load...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.