Tuesday, April 28, 2009

[jQuery] Re: how to make an alert before processing a form

If you want to style your alert use a submit button and preventDefault
(use whatever your confortable with to do this).
Instead, have it popup a div with your options in, and on the yes
button, trigger this to submit for the form

document.FormName.submit();

brian wrote:
> As Mike said, bind a function to the form's submit and "return
> confirm('your msg');"
>
> On Tue, Apr 28, 2009 at 11:02 AM, hybris77 <disturb@yahoo.com> wrote:
>
>> I think what I want to do is do a preventDefault(),
>> throw a custom alert with a YES and NO button
>> then reverse the preventDefault()
>>
>> maybe? Hmmm, but im not sure im on the right
>> track here
>>
>> /pär
>>

No comments: