Event cancelling in Firefox

This is a discussion on "Event cancelling in Firefox" within the JavaScript Forum section. This forum, and the thread "Event cancelling in Firefox are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 10th, 2007, 10:02
Up'n'Coming Member
Join Date: Aug 2007
Location: Bicester
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Event cancelling in Firefox

Hello

I am trying to stop an event bubbling up in Firefox. A function is called like this:
Code: Select all
<span onclick="popupTranscript(objectID,event);return false;" >...
The body has an onclick event handler which does various things. I don't want this to be called when the user clicks the span above.

In IE this is no problem. In the function popupTranscript I simply do
Code: Select all
window.event.cancelBubble=true
but what is the solution in Firefox? I tried e.preventDefault where e is the event object but nothing doing.

Anyone know?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 10th, 2007, 15:11
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 155
Thanks: 0
Thanked 4 Times in 4 Posts
Re: Event cancelling in Firefox

Have you tried adding a browser check to your function and controlling it from there?
__________________
Web Design and Development
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 13th, 2007, 09:06
Up'n'Coming Member
Join Date: Aug 2007
Location: Bicester
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Event cancelling in Firefox

Hi Scott

The question is what is the FF method to cancel an event from bubbling up?

I can tell if I'm in IE of FF

With regards

Justin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
event bubbling

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the onload event only for <body> tag??? Love2Java JavaScript Forum 7 Jul 30th, 2007 12:44
Event gateways for dummies tallgal2007 Other Programming Languages 1 Jul 18th, 2007 09:47
Event handlers in Firefox irida JavaScript Forum 1 Sep 29th, 2006 16:06
EVENT: SPARK - Flash Event Flasher Flash & Multimedia Forum 0 Nov 15th, 2005 10:08


All times are GMT. The time now is 00:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42