Doesn't your browser report some errors when you try to submit the
form? Try $("[name='signup']").click when you bind the function. I've
also never seen the object notation quite like what you are using for
your data parameter. Shouldn't it be something like
$("[name='LASTNAME']").val()? If you want to select your form fields,
you should really give them ids and select them with # selector. It's
much faster that way.

Also note that there is a much simpler way to submit your form:
$.post(url, $('#form').serialize(), callback);

2009/8/17 efet <efetun...@gmail.com>:
>
> Hi,
> Can someone tell me why the following form submit codes are not
> working. When I click submit, I want to see other page's output and
> form submitted text but instead nothing appears.
>
>
>    $(document).ready(function() {
>        $([name=signup]).click(function() {
>                $.ajax({
>                        type: "POST",
>                        data: { PROCESS: "Add2Member", FIRSTNAME:
> [name=FIRSTNAME], LASTNAME: [name=LASTNAME], EMAILADDRESS:
> [name=EMAILADDRESS], PASSWORD: [name=PASSWORD], CITY: [name=CITY] },
>                        url: "default.cs.asp",
>                success: function(output) {
>                $("#SIGNUPFORM").html(output);
>                                $('#SIGNUPFORM').html("<h2>Contact Form 
> Submitted!</h2>")
>                }
>                });
>        });
>    });
>
>                       <form method="post" id="SIGNUPFORM">
>                            <fieldset>
>                                <p>
>                                    <label>Adınız</label>
>                                    <input type="text"
> name="FIRSTNAME" size="55" value="" />
>                                    <small><%=err_FIRSTNAME%></small>
>                                </p>
>                                <p>
>                                    <label>Soyadınz</label>
>                                    <input type="text" name="LASTNAME"
> size="55" value="" />
>                                    <small><%=err_LASTNAME%></
> small>
>                                </p>
>                                <p>
>                                    <label>E-posta Adresiniz</label>
>                                    <input type="text"
> name="EMAILADDRESS" size="55" value="" />
>                                    <small><%=err_EMAILADDRESS%></
> small>
>                                </p>
>                                <p>
>                                    <label>Şifreniz</label>
>                                    <input type="text" name="PASSWORD"
> size="55" value="" />
>                                    <small><%=err_PASSWORD%></small>
>                                </p>
>                                <p>
>                                    <label>Yaşadığınız Yer</label>
>                                    <input type="text" name="CITY"
> size="55" value="" />
>                                    <small><%=err_CITY%></small>
>                                </p>
>                                <p>
>                                    <input type="submit" name="signup"
> value="Kaydol" class="signup" />
>                                </p>
>                            </fieldset>
>                        </form>

Reply via email to