bringing back the form
<p>I have this issue with my form that once its submitted, you will get an error message if you did not fill out any of the fields.
I want users have an option to have back the form after seeing the error message and have an option to refill it.
I feel like I could explain it clearly, check it yourself: www.insead4sq.com</p>

<pre><code>                    &lt;form method="post" action="default.asp?Process=add" id="SIGNUPFORM"&gt;&lt;a href="#" name="signup"&gt;&lt;/a&gt;
                        &lt;fieldset&gt;
                            &lt;p&gt;
                                &lt;label&gt;Name&lt;/label&gt;
                                &lt;input type="text" name="FIRSTNAME" id="FIRSTNAME" size="55" value="" /&gt;
                            &lt;/p&gt;
                            &lt;p&gt;
                                &lt;label&gt;Surname&lt;/label&gt;
                                &lt;input type="text" name="LASTNAME" id="LASTNAME" size="55" value="" /&gt;
                            &lt;/p&gt;
                            &lt;p&gt;
                                &lt;label&gt;Email Address&lt;/label&gt;
                                &lt;input type="text" name="EMAILADDRESS" id="EMAILADDRESS" size="55" value="" /&gt;
                            &lt;/p&gt;
                            &lt;p&gt;
                                &lt;label&gt;Password&lt;/label&gt;
                                &lt;input type="password" name="PASSWORD" id="PASSWORD" size="55" value="" /&gt;
                            &lt;/p&gt;
                            &lt;p&gt;
                                &lt;label&gt;Hometown&lt;/label&gt;
                                &lt;input type="text" name="CITY" id="CITY" size="55" value="" /&gt;
                            &lt;/p&gt;
                            &lt;p&gt;
                                &lt;input type="button" name="signup" value="Sign Up" class="submit" /&gt;
                            &lt;/p&gt;
                        &lt;/fieldset&gt;
                    &lt;/form&gt;   

&lt;script type="text/javascript"&gt;
$(document).ready(function() { 
    $("[name='signup']").click(function() { 
            $.ajax({
                type: "POST",
                data: $("#SIGNUPFORM").serialize(),
                url: "default.asp?Process=add", 
                success: function(output) { 
                $('#SIGNUPFORM').html(output)
                },
                error: function(output) {
                $('#SIGNUPFORM').html(output);
                }
            }); 
    }); 
    $(function update() {
        $.ajax({
            type: "GET",
            url: 'default.cs.asp?Process=TotalMembers',
            timeout: 2000,
            success: function(data) {
                $(".totalmembers").html(data);
                window.setTimeout(update, 5000);
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                $(".totalmembers").html('.');
                window.setTimeout(update, 60000);
            }
        });
    });
}); 
&lt;/script&gt;
</code></pre>
