This topic is locked

Making the AJAX pop up results dependant on another field

9/4/2007 10:33:03 AM
PHPRunner General questions
W
williamhalick author

I'm playing around with the demo trying to create a way to inventory music albums that I have for sale in more used record store. Lets say I have the following Fields:
Band Name:

Album Name:

Location in store:

Condition:
Is it possible to make it so that once the ajax pop up band name (Lets say I have can find a database of just bands and album names so the spelling is always correct) is picked the only thing avaliable in the album ajax pop up is the names of album from what ever was choosen in the band name field?

W
williamhalick author 9/4/2007

Another thing I just noticed is a lot of band names have "The" in them. Is there anyway for the ajax popup to ignore the word "The"... I guess instead of a search for all the words it displays any of the the words?
Thanks again <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21093&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Alexey admin 9/6/2007

Hi,
yes, you can do this with the latest update of PHPRunner.
Make both Band and Album fields editable as Lookup wizards with Ajax popup option turned on.

Make Album dependent on Band.
You can make Ajax popup search for substrings in any place not in the beginning only.

Modify generated ..._lookupsuggest.php file

Find all occurencies of this line there:

$LookupSQL .= "BandName LIKE '".db_addslashes($value)."%'";

and replace them with:

$LookupSQL .= "BandName LIKE '%".db_addslashes($value)."%'";

M
morpheus 9/6/2007

well thats answered my question then <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21162&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />

W
williamhalick author 9/11/2007

well thats answered my question then <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21282&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />


Mine too... this program is awesome <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21282&image=2&table=forumreplies' class='bbc_emoticon' alt=':)' />

X
xliner 9/11/2007



Mine too... this program is awesome <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21284&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />


<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21284&image=2&table=forumreplies' class='bbc_emoticon' alt=':ph34r:' /> Yeah, step by step, the PHP Ninyas are conquering this world ..., it took a long way to get this vital code snippet to be seen in public, and best, musicians had been paving the way..., thx a million...

W
williamhalick author 9/11/2007

I had an issue but after installing the newest beta it went away <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21286&image=1&table=forumreplies' class='bbc_emoticon' alt=':P' />