I''m trying to have the entire page be loaded smoothly as done by Effect.Appear. The only way to launch a javascript on load is <body onload="new Effect.Appear();"> but this does not involve a div. Does anyone know how to have the entire page be affected by Effect.Appear on load? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not really sure you can change the opacity of the body and be
assured it will work in all browsers, so, one way to do it is place a
div in the body that takes the entire width and height of the body.
<body>
<div id="page_container">
<!-- put everything inside here -->
</div>
</body>
And in the CSS (not sure if it will work out of the box, but it should)
#page_container {
width: 100%;
height: 100%;
}
And *there are* other ways of running stuff when the page loads :)
In your javascript file
Event.observe(window, ''load'', function() {
new Effect.Appear(''page_container'');
});
Best,
-Nicolas
On Dec 20, 2007 2:42 PM, pigfox666-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<pigfox666-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> I''m trying to have the entire page be loaded smoothly as done by
> Effect.Appear.
> The only way to launch a javascript on load is <body onload="new
> Effect.Appear();"> but this does not involve a div.
> Does anyone know how to have the entire page be affected by
> Effect.Appear on load?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Thank you! I''ll try that. On Dec 20, 9:33 am, "Nicolás Sanguinetti" <godf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m not really sure you can change the opacity of the body and be > assured it will work in all browsers, so, one way to do it is place a > div in the body that takes the entire width and height of the body. > > <body> > <div id="page_container"> > <!-- put everything inside here --> > </div> > </body> > > And in the CSS (not sure if it will work out of the box, but it should) > > #page_container { > width: 100%; > height: 100%; > > } > > And *there are* other ways of running stuff when the page loads :) > > In your javascript file > > Event.observe(window, ''load'', function() { > new Effect.Appear(''page_container''); > > }); > > Best, > -Nicolas > > On Dec 20, 2007 2:42 PM, pigfox...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <pigfox...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I''m trying to have the entire page be loaded smoothly as done by > > Effect.Appear. > > The only way to launch a javascript on load is <body onload="new > > Effect.Appear();"> but this does not involve a div. > > Does anyone know how to have the entire page be affected by > > Effect.Appear on load?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
After trying this:
<body onload="ini();">
function ini()
{
Event.observe(window, ''load'', function(){new
Effect.Appear(''page_container'');});
}
I get an IE error only
''null'' is null or not an object
Any clue?
On Dec 20, 11:22 am,
"pigfox...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
<pigfox...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Thank you!
> I''ll try that.
>
> On Dec 20, 9:33 am, "Nicolás Sanguinetti"
<godf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > I''m not really sure you can change the opacity of the body
and be
> > assured it will work in all browsers, so, one way to do it is place a
> > div in the body that takes the entire width and height of the body.
>
> > <body>
> > <div id="page_container">
> > <!-- put everything inside here -->
> > </div>
> > </body>
>
> > And in the CSS (not sure if it will work out of the box, but it
should)
>
> > #page_container {
> > width: 100%;
> > height: 100%;
>
> > }
>
> > And *there are* other ways of running stuff when the page loads :)
>
> > In your javascript file
>
> > Event.observe(window, ''load'', function() {
> > new Effect.Appear(''page_container'');
>
> > });
>
> > Best,
> > -Nicolas
>
> > On Dec 20, 2007 2:42 PM,
pigfox...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<pigfox...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > I''m trying to have the entire page be loaded smoothly as
done by
> > > Effect.Appear.
> > > The only way to launch a javascript on load is <body
onload="new
> > > Effect.Appear();"> but this does not involve a div.
> > > Does anyone know how to have the entire page be affected by
> > > Effect.Appear on load?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---