Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old August 10th, 2007, 06:02 AM   #1
WebForumz Member
 

Join Date: Aug 2007
Location: Bicester
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Kropotkin is on a distinguished road
Cool Event cancelling in Firefox

Hello

I am trying to stop an event bubbling up in Firefox. A function is called like this:
Code:
<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:
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?
Kropotkin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 10th, 2007, 11:11 AM   #2
Reputable Member
 

Join Date: Dec 2005
Location: U.S.A.
Posts: 156
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Altering Power: 0 ScottR is on a distinguished road
Re: Event cancelling in Firefox

Have you tried adding a browser check to your function and controlling it from there?
__________________
Web Design and Development
ScottR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 13th, 2007, 05:06 AM   #3
WebForumz Member
 

Join Date: Aug 2007
Location: Bicester
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Kropotkin is on a distinguished road
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
Kropotkin is offline  
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

Bookmarks

Tags
event bubbling


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 7 July 30th, 2007 08:44 AM
Event gateways for dummies tallgal2007 Other Languages 1 July 18th, 2007 05:47 AM
Event handlers in Firefox irida JavaScript 1 September 29th, 2006 12:06 PM
EVENT: SPARK - Flash Event Flasher Flash and ActionScript 0 November 15th, 2005 06:08 AM


Search Engine Optimization by vBSEO 3.2.0 RC8