Hi,

> But I want to return a message to person.jsp if there is success
> or failer on save.jsp page.

Use an onSuccess callback[1] and look at the response. For this sort
of thing, I usually generate a JSON response (Content-Type =
"application/json"), and so in my case I look at the `responseJSON`
property on the response object[2] given to my onSuccess handler
(because Prototype recognizes that content type and automatically
deserializes the JSON data into an object). But you can use a
different content type if you like and look at `responseText` instead.

[1] http://api.prototypejs.org/ajax/ajax/request.html
[2] http://api.prototypejs.org/ajax/ajax/response.html

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com

On Mar 8, 7:21 pm, samson <sbeke...@gmail.com> wrote:
> I use the prototype request() function to sumbit my form to a JSP
> page. It work fine and I am able to save the data to the database. But
> I need to return a message to the form page if the JSP page
> successfully save the data. Here is an example
>
> I have a page called person.jsp and all the form field in this page.
> When a user click on save button I use the prototype request function
> and send the form variable to save.jsp page with out sumbitting the
> form. But I want to return a message to person.jsp if there is success
> or failer on save.jsp page.
>
> Thanks,
> Samson

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to