[Catalyst] Prototype help

Alan Humphrey alan.humphrey at comcast.net
Mon Jul 25 19:19:10 CEST 2005


All -

 

This list has been a lifesaver in the past, I'm hoping it can come through
again.  I'm trying to use Prototype/Ajax and I'm running into a brick wall.
Here's the (simplified) scenario:

 

User comes to a page with a form with two entry fields.  One field is ISBN,
the other is Title.

 

User enters an ISBN.  On tabbing out of the field we do a look up to see if
the ISBN is already on file.

 

If the ISBN is on file we return the title and display it in the Title
field.  Otherwise we display a message above the title field asking for
input.

 

After making changes/additions the user pressing the "save" button and the
form is processed normally, saving the data to the database.

 

 

Part of my problem is that I'm new to JavaScript.  However, I have figured
out how to declare a JS function and get it called from an 'onchange' event.
So far so good.  My function extracts the current ISBN value from the form.
Now:

 

            1 - How do I get that value passed to the server?

            2 - What does my server function have to do to return data?

            3 - How do I define the callback to deal with the returned data?

 

I see function names in Prototype that look promising, e.g.
update_element_function, but I haven't been able to figure out how to string
them all together to get the job done.

 

Pointers, help, advice - all are welcome!

 

Many thanks!

 

- Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050725/865057da/attachment.htm


More information about the Catalyst mailing list