For this, I need to a record from a DB to a page using AJAX so that it
populates an existing form
I can do it already if i just have to return a value such as dog.name
but I need to return a row like "dog"
would can I return a full row from the controller ?
Example:
def ajaxgetissue():
name = request.vars.values()[0]
issue = db(db.issues.title.like(name)).select()
return XXXXXXXXXX <- what goes here so that I can
process in the View side ?
On May 21, 6:45 pm, blackthorne <[email protected]> wrote:
> hi,
> here's my problem.
>
> I have a database with security issues I found in the past and I want
> to be able to fill new ones based on it.
> the idea was to fill one input field "title" with a word that could
> exist in a previous inserted item. A select box would show up with top
> 5 possibilities, just like you have in gmail contacts when choosing
> the destination for one of your emails. Notice this is not just common
> auto-completion because the name of option selected doesn't have to
> start the way you are writing, it's more like a search. Finally, by
> choosing one of those options, you would get the whole form
> prepopulated with the contents used in the selected name.
>
> I know this is a big thing to ask, at least it's something big enough
> to me as AJAX hasn't yet became intuitive as I would like. In case you
> have anything that can help me on this task, thank you.