Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Trouble with onload function

Reply
Thread Tools

Trouble with onload function

 
 
jamierphelps@gmail.com
Guest
Posts: n/a
 
      05-16-2006
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.

 
Reply With Quote
 
 
 
 
Zifud
Guest
Posts: n/a
 
      05-17-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
onload -->* no onload marco Javascript 7 06-24-2006 08:39 PM
function / function() / window.onload= Q Javascript 7 03-27-2006 12:47 PM
Why doesn't frameset onload event get called when each of the frames has an onload? adnanx82@gmail.com Javascript 5 05-15-2005 01:58 PM
base.OnLoad called, OnLoad not executed Fabio R. ASP .Net 0 03-25-2005 01:21 PM
window.onload and body.onload differences David Otton Javascript 2 11-04-2004 04:34 PM



Advertisments