Re: AJAX vs. Xforms

Daniel Swarbrick wrote:
> Erik Bruchez wrote:
> 
>>
>> Mark,
>>
>> Daniel doesn't only want to tell whether there was a success or a 
>> failure, but also to display a series of errors returned by the 
>> server. In that case, the event sent upon the completion of the 
>> submission will always be xforms-submit-done, whether his server-side 
>> code succeeds or fails, since in both cases a new instance containg 
>> the status of the server-side operations will be returned 
>> successfully. So he needs some type of conditions, whether by using 
>> relevant or conditional events, as I suggested.
> 
> 
> Assuming I'm working with Firefox 1.5b2, and the preview release 2 of 
> Mozilla's XForms extension, what are my options to achieve this? Can 
> xpath toggle the visibility of one of two <div>'s, depending on the DB 
> insert success/failure?
> 
> One option I looked at previously was setting the HTTP response code to 
> 499 upon server-side validation failure, hoping to trigger the 
> xforms-submit-error event - but apparently Mozilla's xforms processor 
> doesn't (yet) behave this way.
> 
> Excuse me if these questions are way off base - I'm really on the fringe 
> of my knowledge here.

I think that the solution with "relevant", suggested earlier, will work 
if Firefox implements correctly "relevant" for <xforms:group>, as well 
as the "instance" attribute on <xforms:submission>. The easiest way to 
make sure would be to give it a try, unless somebody more knowledgeable 
in the Firefox implementation can provide a ready answer.

-Erik

Received on Wednesday, 26 October 2005 13:00:59 UTC