Forums

Ajax Autocomplete Search -> URL

fuxo 06 Nov, 2012
Hi all,

i have module with Ajax Autocomplete and i search users from Community Builder.
it's possible redirect to URL with "value (from DB)" in end of URL of user profile when i click on loaded username?

Community Builder URL:
index.php?option=com_comprofiler&task=userprofile&user=833

Number 833 on end is ID saved in DB.

Thanks for your answers.
(sorry for my english, i am beginer)
Max_admin 06 Nov, 2012
Hi,

If you get 833 in the auto complete box then you can redirect but do you get the ID or the username itself ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
fuxo 06 Nov, 2012
Hi Max,

for example:
I have tree users:

MySQL:
Name | ID
===============
lastname1 | 831
lastname2 | 832
lastname3 | 833

i need this:
In Ajax autosearch i click on lastname3 and i want load ID of person "lastname3" (in same row) from database and redirect visitor to link:
index.php?option=com_comprofiler&task=userprofile&user=833
(833 is ID loaded from DB).

it's possible or is this only my optimistic idea ?
Max_admin 06 Nov, 2012
Hi fuxo,

The problem is that the returned value will be lastname3 but not 833 and so you can't do the redirect based on that number, but instead you can ask the user to submit the form, run a SQL query to fetch the user id using the last name provided then redirect to the CB link.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.