This topic is locked

Automatic Lookup in Search Fields

5/22/2007 12:33:40 AM
PHPRunner General questions
S
slobbering_dog author

I have made several pages that work really, really well and I love using PHPR. However one thing has (which I think is new since 3.1) has made some of my search pages almost unusable.
If I have an advanced search page with the fields :
warehouse

stock group

stock code
and I want to search on stock code. When I start to type the stock code there is an automatic list that appears for a suggested stock code. It seems to search the stock code (or which ever field I am searching) after every letter.
Because we have > 25000 stock codes there is a verylong delay when this automatic list is generated.
Is there any way of turning this off ? Or is there a way of making it search only on the beginning of the field being searched ?

I don't really need it for any of my search fields.
Thanks in advance for your help,
Slobbering Dog

J
Jane 5/22/2007

Hi,
to turn off Ajax search suggestion option open generated ..._search.php file, find these lines:

include("include/dbcommon.php");

include("include/order_details_variables.php");

include("include/languages.php");

and add following code just after:

$useAJAX = false;

S
slobbering_dog author 5/22/2007

Jane, from the bottom of my heart - THANKYOU!!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18117&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
You have preserved my fragile state of mind. Your solution worked perfectly.
One of the part numbers I was typing in was PFHG-1143-25-RG - and the search suggestion endinge thingy was takign about 30 seconds 'per letter' to go through and make a list to choose from.
Thankyou, I really mean it !!
PS: Any chance we could get a little options page to turn this type of option on / off globally in future releases ?
Regards,
Slobber

Hi,

to turn off Ajax search suggestion option open generated ..._search.php file, find these lines:

and add following code just after:

J
Jane 5/23/2007

Hi,
to turn off Ajax globally open generated include/dbcommon.php file and edit this line:

$useAJAX = true;

X
xliner 5/23/2007

Slobbering Dog,
I was willing to see on how signaled Adelaide based speeds on 25,000 records large of 30 CHARCTERS PER SECOND would compare on my $6.35/mo. virtual host and installed a TEST file under:
http://webappliances24.eu/co2
Login: test

Password: test
and found very promising results ..., so, prior emasculating the AJAX feature as per code snippets above, I think, it´s worth to have a look at the server capacity first ...
HTH Hajo

X
xliner 5/23/2007

Slobbering Dog,
meanwhile increased from former 25,000 to 500,000 test records ..., with no significant delays...
HTH Hajo
29.05.07 - Removal of demo file mention ed above.