473,508 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble with onload function

I'm sure you guys are tired of seeing this kind of message, but this is
hopefully something a little different. I searched first.

I am using Drupal for a site and I also want to use Nifty Corners Cube
for styling purposes. On certain pages, Drupal adds its own onload
functions, so I am using the workaround built into NCC, the
NiftyLoad=function() method. It seems that the onload event is not
getting executed in Firefox Mac (the only other browser besides Safari
I can test on right now). The script fires off in Safari. Here is what
I have done to test so far.

1) Change from NiftyLoad to window.onload on a page where no other
onload attributes were called by Drupal.
2) Include a alert('okay'); call in the window.onload event for
debugging.

Neither of these yielded any joy. I hope someone out there has the
answer.

P.S. I think the same is happening with Firefox PC and IE 6 PC because
I had my wife test yesterday while at work and she said the corners
weren't rounded and the columns weren't the same height. I will test
this myself when I go to work later today.

May 16 '06 #1
1 1990
ja**********@gmail.com wrote:
I'm sure you guys are tired of seeing this kind of message, but this is
hopefully something a little different. I searched first.

I am using Drupal for a site and I also want to use Nifty Corners Cube
for styling purposes. On certain pages, Drupal adds its own onload
functions, so I am using the workaround built into NCC, the
NiftyLoad=function() method.
I guess you are talking about this stuff:

<URL:http://www.html.it/articoli/niftycube/index.html>

It seems that the onload event is not
getting executed in Firefox Mac (the only other browser besides Safari
I can test on right now). The script fires off in Safari. Here is what
I have done to test so far.
1) Change from NiftyLoad to window.onload on a page where no other
onload attributes were called by Drupal.
2) Include a alert('okay'); call in the window.onload event for
debugging.

Neither of these yielded any joy. I hope someone out there has the
answer.
What does the JavaScript console say?

Are you saying that onload function is not fired at all in Firefox?

Asking vague questions with no code and no error messages means you've
got little chance of decent help.

P.S. I think the same is happening with Firefox PC and IE 6 PC because
I had my wife test yesterday while at work and she said the corners
weren't rounded and the columns weren't the same height. I will test
this myself when I go to work later today.


The way to attach multiple load functions without stomping on others is
to use something like:

if (window.attachEvent) {
window.attachEvent('onload', functionRef);
} else if (window.addEventListener){
window.addEventListener('load', functionRef, false);
}

where functionRef is the name of the function (or some other reference
to it) without a following '()'.

--
Zif
May 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4893
by: Pai | last post by:
hello there, I am trying to rersize the window it works find in IE but doea not work with mozilla window.attachEvent(onload,MWSOnLoad); window.onload = function (MWSOnLoad) { alert('hello');...
6
4536
by: Brian | last post by:
Hi everyone, I'm writing a function (in javascript) that needs to do one thing if the page has not loaded, and another (different) thing if the page has already loaded. I'm looking for a way...
4
2333
by: David Virgil Hobbs | last post by:
My web host inserts banner ads into my html pages. The javascript in these banner ads interferes with the onload triggered javascript functions in my pages. Whether I trigger my javascript...
2
7661
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
3
5420
by: Jake Barnes | last post by:
I thought I understood this article: http://simon.incutio.com/archive/2004/05/26/addLoadEvent It seems like a smart, insightful function: function addLoadEvent(func) { var oldonload =...
10
1649
by: whisher | last post by:
Hi. I'm not able to understand why this simple snippet doesn't work with IE. It works fine with FF and Opera 9. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
20
11832
by: Mark Anderson | last post by:
Hi, I have this in an external JS library: ///////////////////////// function addMyEvent(){ var obj; if(document.attachEvent) { obj = document.getElementsByTagName('img'); for...
1
8140
by: zebra242 | last post by:
I'm working to get the onLoad function of a javascript to work: the script allows form buttons in html to refer to labeled frames in flash. Which works fine. Now I want to add onLoad...
5
13304
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.