Ajax forms help

Ajax forms help

I need some help with a form.

I submit the form fine, my problem is depending on the success or failure of
the form being saved. I will try to explain as simple as possible

form is in its own div <form here ..... >

<div target> saved data will appear here</div>

So what I need is i guess json success true or false response from the form
being saved or not then in my success

success: function
response
{
            // Response was a success
            if
response
{
                //update my target div
            // Response contains errors
            } else {
                // return the form with the errors
            }
But if I am returning json I cant return my normal html after the successful
save, and if I return my response as html there is no way to tell the js
what to do.
The form or the target is html code
How can I tell what the response was
true or false
and return the
appropriate html code for the appropriate form or target?
Thanks

Dave