[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-03 Thread Clare
It's working like a charm now. I used mkmanning's way. Thanks for those who helped me! Clare

[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread waseem sabjee
you could also completely remove the field from the DOM ("#myfield").remove(); On Wed, Jun 3, 2009 at 7:40 AM, mkmanning wrote: > > To set the value of a form field, use this: > > $("#myFieldId").val("") > > To do this without setting the field to an empty value, modify your > original approach:

[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread mkmanning
To set the value of a form field, use this: $("#myFieldId").val("") To do this without setting the field to an empty value, modify your original approach: $("#MyForm").submit(function(){ var params = $(this).serializeArray(); $.post('/register.php', $(par

[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread Clare
I tried disabing the field, but unfortunately no respose from the server in ajax call. $("#myFieldId").attr({value:""}) works fine. Is there any way to do this without resetting the field value?

[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread Gustavo Salomé
Try to disable the field. I think its gonna work. 2009/6/2 waseem sabjee > SORRY > SYNTAX ERROR > here is the correct > > $("#myfieldid").attr({ > value:"" > }); > > > > On Tue, Jun 2, 2009 at 6:11 PM, waseem sabjee wrote: > >> $("#myfieldid").attr({ >> value:""; >> }); >> >> this should set the

[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread waseem sabjee
SORRY SYNTAX ERROR here is the correct $("#myfieldid").attr({ value:"" }); On Tue, Jun 2, 2009 at 6:11 PM, waseem sabjee wrote: > $("#myfieldid").attr({ > value:""; > }); > > this should set the value to nothing. > > > On Tue, Jun 2, 2009 at 7:24 AM, Clare > wrote: > >> >> I have email, passw

[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread waseem sabjee
$("#myfieldid").attr({ value:""; }); this should set the value to nothing. On Tue, Jun 2, 2009 at 7:24 AM, Clare wrote: > > I have email, password and some other fields, and I'm using $.post to > send data for Ajax submission. > > $("#MyForm").submit(function(){ >$.post('/register.php',