| Subcribe via RSS

cancelBubble

May 14th, 2008 | No Comments | Posted in javascript by dreamluverz

I have this function but something was wrong with firefox. I got undefine value. After taking a closer look in my code I forgot to pass the 'event' parameter on my function.



function dps_cancel_bubble(e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}

so you need to call it like this.

<img src=”" onlickc=”dps_cancel_bubble(event)”> DONT EVER FORGET TO PASS event or else you’ll get crazy looking for the bug :P I almost did :lol:

Tags: , , , , , ,

javascrpt function setHomePage doesn’t work with firefox and ie

December 1st, 2007 | No Comments | Posted in javascript by dreamluverz

We need to use this javascript function setHomePage() for our website but my teammate said it only works for ie. So I did some checking on that function and bumped into different sites that referenced it.  And some are listed below.



references:

http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Q_22761088.html

http://www.boutell.com/newfaq/creating/sethomepage.html

Anyways, if you have any idea or workaround for this let us know we would be very glad to know it. Thanks in advance.

Tags: , , ,