I want to have something like Facebook has. In some cases when you post something a success message shows up (on the same page, not a pop- up), stays 2-3 seconds and then fades away. How can I do that with Prototype? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brian Williams
2007-Oct-24 23:07 UTC
Re: How can I hide a DIV with a success message inside?
there''s this thing called script.aculo.us check it out at the same URI. On 10/24/07, Mircea <mirceagoia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > I want to have something like Facebook has. In some cases when you > post something a success message shows up (on the same page, not a pop- > up), stays 2-3 seconds and then fades away. > > How can I do that with Prototype? > > Thanks. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Deep Ganatra
2007-Oct-25 08:42 UTC
Re: How can I hide a DIV with a success message inside?
<script type="text/javascript" language="javascript">
window.onload=function(){
new Effect.Fade(''YourFormID'',{delay:2});
return false
}
</script>
you can change the digit 2 to anything you wish..you can change the
effect to any effect you wish, dont forget to replace YourFormID with
your actual form ID.
I hope it helps.
Deep
On Oct 25, 4:05 am, Mircea
<mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I want to have something like Facebook has. In some cases when you
> post something a success message shows up (on the same page, not a pop-
> up), stays 2-3 seconds and then fades away.
>
> How can I do that with Prototype?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Ok, I guess I have to explain more (because this code didn''t worked for me in my situation). I am using an ajax tab style page so when i click on a tab the contact page loads inside a DIV using Ajax. After loading I have a form which will be submitted using again Ajax. After submitting a success message shows up in another DIV above the form...and that message I want to dissapear aftyer 2-3 seconds, not the form! I hope it''s more clear now. Thank you again. On Oct 25, 1:42 am, Deep Ganatra <dee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> <script type="text/javascript" language="javascript"> > window.onload=function(){ > new Effect.Fade(''YourFormID'',{delay:2}); > return false > } > </script> > > you can change the digit 2 to anything you wish..you can change the > effect to any effect you wish, dont forget to replace YourFormID with > your actual form ID. > > I hope it helps. > Deep > > On Oct 25, 4:05 am, Mircea <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I want to have something like Facebook has. In some cases when you > > post something a success message shows up (on the same page, not a pop- > > up), stays 2-3 seconds and then fades away. > > > How can I do that with Prototype? > > > Thanks.- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brian Williams
2007-Oct-26 16:15 UTC
Re: How can I hide a DIV with a success message inside?
then you''ll need to put in a dedicated div or span for the message
<div id="message_box">message success or failure</div>
new Effect.Fade($("message_box"),{duration:''3''})
something to that effect
On 10/25/07, Mircea <mirceagoia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Ok, I guess I have to explain more (because this code didn''t
worked
> for me in my situation).
>
> I am using an ajax tab style page so when i click on a tab the contact
> page loads inside a DIV using Ajax.
> After loading I have a form which will be submitted using again Ajax.
> After submitting a success message shows up in another DIV above the
> form...and that message I want to dissapear aftyer 2-3 seconds, not
> the form!
>
> I hope it''s more clear now.
>
> Thank you again.
>
> On Oct 25, 1:42 am, Deep Ganatra
<dee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > <script type="text/javascript"
language="javascript">
> > window.onload=function(){
> > new
Effect.Fade(''YourFormID'',{delay:2});
> > return false
> > }
> > </script>
> >
> > you can change the digit 2 to anything you wish..you can change the
> > effect to any effect you wish, dont forget to replace YourFormID with
> > your actual form ID.
> >
> > I hope it helps.
> > Deep
> >
> > On Oct 25, 4:05 am, Mircea
<mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> >
> >
> > > I want to have something like Facebook has. In some cases when
you
> > > post something a success message shows up (on the same page, not
a
> pop-
> > > up), stays 2-3 seconds and then fades away.
> >
> > > How can I do that with Prototype?
> >
> > > Thanks.- Hide quoted text -
> >
> > - Show quoted text -
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
It works now! Thank you! Mircea On Oct 26, 9:15 am, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> then you''ll need to put in a dedicated div or span for the message > > <div id="message_box">message success or failure</div> > > new Effect.Fade($("message_box"),{duration:''3''}) > > something to that effect > > On 10/25/07, Mircea <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Ok, I guess I have to explain more (because this code didn''t worked > > for me in my situation). > > > I am using an ajax tab style page so when i click on a tab the contact > > page loads inside a DIV using Ajax. > > After loading I have a form which will be submitted using again Ajax. > > After submitting a success message shows up in another DIV above the > > form...and that message I want to dissapear aftyer 2-3 seconds, not > > the form! > > > I hope it''s more clear now. > > > Thank you again. > > > On Oct 25, 1:42 am, Deep Ganatra <dee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > <script type="text/javascript" language="javascript"> > > > window.onload=function(){ > > > new Effect.Fade(''YourFormID'',{delay:2}); > > > return false > > > } > > > </script> > > > > you can change the digit 2 to anything you wish..you can change the > > > effect to any effect you wish, dont forget to replace YourFormID with > > > your actual form ID. > > > > I hope it helps. > > > Deep > > > > On Oct 25, 4:05 am, Mircea <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > I want to have something like Facebook has. In some cases when you > > > > post something a success message shows up (on the same page, not a > > pop- > > > > up), stays 2-3 seconds and then fades away. > > > > > How can I do that with Prototype? > > > > > Thanks.- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- How can I get RVM/Passenger/Apache2 to play nicely together
- Ruby on Rails 3.1 Installation tutorial for Ubuntu (versions 11.04, 11.10) and Linux Mint (version 11) - download or read online if you need it
- How to achieve the 'multi' fade effect that is used by Apple computer?
- 3 prototype/scriptaculous effects in order on one <div>
- cross-fade effect on elements updated by ajax.updater?