I want to make a fade out effect on a div element ('main') of my page
every time the page is getting closed.

I wrote this code:

<body onunload="javascript:onUnloadPage();" ...

function onUnloadPage() {
        Effect.Fade('main', { duration: 0.5 });

The alert is correctly displayed, but the fade effect is not applyed
on the 'main' div element.
Just to make a trial, I've associated the same function on an
'onclick' event of a link in the page and the fade effect works...

I also tryed to use the onbeforeunload event, but with same result.

Where am I wrong?

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to