CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Bound Column on Autocomplete

Print topic Send  topic

Author Message
coyote999

Posts: 22
Posted: 07/07/2008, 3:27 AM

Hello!

I need help for the new AJAX-Feature "Autocomplete"

There's a table like "City_ID, Cityname"
The Autocomplete-Search column is of course "Cityname", but
how can i submit the Value "City_ID" for the selected Cityname?

Thanks for help!

Martin
View profile  Send private message
TheunisP

Posts: 342
Posted: 07/30/2008, 6:18 AM

*bump*

I would also want to know
View profile  Send private message
maxhugen

Posts: 272
Posted: 07/31/2008, 6:49 PM

I thought I wouldn't mind a solution to this one either, so I had a bit of a look at the CCS example to see what's going on.

Basically, the pt/scriptaculous function 'Autocompleter' that provides the 'drop down list' only returns one field. We'd really need 2 - the second being the ID field, which should be hidden. Not being an expert, I don't see a way around that, short of writing your own function to do this - and probably custom coding the whole AutoComplete procedure. Yuk!

The CCS example itself will not work properly if there is more than one employee with the same name, eg 'John Smith'. Entirely possible!

My suggestion - untried, as I haven't the time - would be to create a concatenated field of City + State + Zipcode right from the start in your Record's data source. Then use this as the basis for the AutoComplete.

Based on this concatenation, it should bring back a unique record - I think. :-/

Note that once the record has been retrieved, you'll have the city_id in, presumably, a hidden field.

HTH!
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.