[jQuery] Re: event.preventDefault() seems to fail

2008-11-03 Thread Prajwala Manchikatla
I just changed input button type from submit to button. Then it is working as your need. The submit button will always call the form submit when ever it is clicked, even when you press enter also it call the form submit. But normal button do not call form submit all the time. http://www.w3.org/TR/x

[jQuery] Re: event.preventDefault() seems to fail

2008-11-02 Thread Hullah
Ok, I see what you're saying now. But stopPropigation doesn't work in this case either. Looking at the code sample that I posted at the beginning, even if I add a e.stopPropagation() after the preventDefault() it still causes the form to submit.

[jQuery] Re: event.preventDefault() seems to fail

2008-10-30 Thread Prajwala Manchikatla
Sorry for late reply. It is like this, suppose if you have elements like this I am parent I am child If you assign onclick event for both parent and child. when you click on parent div then parent div event handlers will fire. when you click on child div then first child div event h

[jQuery] Re: event.preventDefault() seems to fail

2008-10-24 Thread Hullah
I'm sorry, but I'm not following you. Can you further explain what you mean? Thanks On Oct 24, 12:36 am, "Prajwala Manchikatla" <[EMAIL PROTECTED]> wrote: > You can think of > stopPropagation.http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-flow > I hope this might help you.

[jQuery] Re: event.preventDefault() seems to fail

2008-10-23 Thread Prajwala Manchikatla
You can think of stopPropagation. http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-flow I hope this might help you. On Sat, Oct 18, 2008 at 11:26 PM, Ryan Hullah <[EMAIL PROTECTED]> wrote: > > I've thought of that, but I'm not sure that would work for me. I only > want a sub section of

[jQuery] Re: event.preventDefault() seems to fail

2008-10-18 Thread Ryan Hullah
I've thought of that, but I'm not sure that would work for me. I only want a sub section of input textboxes and certain input buttons within that sub section to prevent the form submit on the Enter button. So if I did it on the form submit event, I'd need to know who caused the submit and whethe

[jQuery] Re: event.preventDefault() seems to fail

2008-10-18 Thread Prajwala Manchikatla
instead of using preventDefault for the input, submit buttons use it for the form.submit event. That means write a event handler for onsubmit event of form and in that handler use preventDefault. It will work. We also had a same requirement. It solves the problem. On Sat, Oct 18, 2008 at 9:14 AM,

[jQuery] Re: event.preventDefault() seems to fail

2008-10-17 Thread Hullah
Hmm...it looks like triggerHandler() is what I want. Because my goal is to not submit the form, which was the reason I was calling event.preventDefault() inside the click event. I just thought it was confusing because in the click even of the button I was trying to prevent the default action of

[jQuery] Re: event.preventDefault() seems to fail

2008-10-17 Thread Choan Gálvez
On Oct 17, 2008, at 11:22 PM, Hullah wrote: I would think preventDefault() is the right way to do it too. So, given that this isn't working like I would have thought it should, did I code this incorrectly? Or is this something more serious like a bug? While I don't fully understand what you

[jQuery] Re: event.preventDefault() seems to fail

2008-10-17 Thread Hullah
I would think preventDefault() is the right way to do it too. So, given that this isn't working like I would have thought it should, did I code this incorrectly? Or is this something more serious like a bug? On Oct 17, 4:36 pm, Choan Gálvez <[EMAIL PROTECTED]> wrote: > On Oct 17, 2008, at 7:37 P

[jQuery] Re: event.preventDefault() seems to fail

2008-10-17 Thread Choan Gálvez
On Oct 17, 2008, at 7:37 PM, ricardobeat wrote: It should work... but in jQuery 'return false' is the standard cross- browser way of preventing the default action anyway, Not exactly. - `preventDefault()` **is** the cross-browser way of preventing the default action. - `return false` pr

[jQuery] Re: event.preventDefault() seems to fail

2008-10-17 Thread ricardobeat
It should work... but in jQuery 'return false' is the standard cross- browser way of preventing the default action anyway, so I'd recommend sticking to that. - ricardo On Oct 16, 11:16 pm, Hullah <[EMAIL PROTECTED]> wrote: > I have a page with input textboxes and input buttons on it.  All are >