[jQuery] Re: event.preventDefault(); not working in IE

2009-07-18 Thread richard harriman
Hi, Here's how it looks: script type=text/javascript !-- $(document).ready(function() { $(#send).click(function (e){ e.preventDefault(); }); }); On Fri, Jul 17, 2009 at 4:28 PM, robotwink robotw...@gmail.com wrote: Hi, Here's how it looks: script

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread James
Without seeing the context of the rest of your code, it's difficult to help. Are you sure 'event' is set to the correct event object? On Jul 17, 10:18 am, robotwink robotw...@gmail.com wrote: Hello, I'm using IE8 and when I pass: event.preventDefault(); I get an error message: Webpage

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread robotwink
Hi, Here's how it looks: script type=text/javascript !-- $(document).ready(function() { $(#send).click(function (){ event.preventDefault(); }); }); //-- /script On Jul 17, 4:25 pm, James james.gp@gmail.com wrote: Without seeing the context of the rest

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread James
The event object doesn't exist in your callback function, you have to put it in the function parameter list: $(#send).click(function (event){ // - over here event.preventDefault(); }); On Jul 17, 10:28 am, robotwink robotw...@gmail.com wrote: Hi, Here's how

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread robotwink
Thanks, but why it's working fine in Chrome without the function parameter? On Jul 17, 5:09 pm, James james.gp@gmail.com wrote: The event object doesn't exist in your callback function, you have to put it in the function parameter list:         $(#send).click(function (event){  // - over

[jQuery] Re: event.preventDefault(); not working in IE

2009-07-17 Thread Theodore Ni
It's been common practice when coding for Firefox to do this. That it isn't the same in Chrome I hadn't noticed, see: html head titleTest/title script type=text/javascript var event = 'test'; alert(window.event); window.onload = function() { alert(window.event); setTimeout(function() {