Guo Yangguang
2008-Apr-14 10:02 UTC
bring out an some size window when click a link in an ajax
i want to ask you how to make an ajax call to bring out an some size window when click a link.Just tell me the outline instead of detail about how to.Thank you! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I use an unobtrusive approach, with this prototype library: http://livepipe.net/projects/control_modal/ . 1. Put a normal link in your view <a class="someclass" href="some_action">link</a>. 2. Then in the application.js just initialize it: $$(''a.someclass'').each(function(link){ new Control.Modal(link,{ [...] }); }); On Apr 14, 12:02 pm, Guo Yangguang <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> i want to ask you how to make an ajax call to bring out an some size > window when click a link.Just tell me the outline instead of detail > about how to.Thank you! > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Guo Yangguang
2008-Apr-15 04:37 UTC
Re: bring out an some size window when click a link in an ajax
Thank you.I will try it. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Roger Pack
2008-Apr-15 07:00 UTC
Re: bring out an some size window when click a link in an ajax
Guo Yangguang wrote:> i want to ask you how to make an ajax call to bring out an some size > window when click a link.Just tell me the outline instead of detail > about how to.Thank you!google for javascript popup ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Guo Yangguang
2008-Apr-18 02:18 UTC
Re: bring out an some size window when click a link in an ajax
An wrote:> I use an unobtrusive approach, with this prototype library: > http://livepipe.net/projects/control_modal/ . > > 1. Put a normal link in your view <a class="someclass" > href="some_action">link</a>. > 2. Then in the application.js just initialize it: > > $$(''a.someclass'').each(function(link){ > new Control.Modal(link,{ > [...] > }); > });hello: I have downloaded the file "control.modal.2.2.3.js" and put it in "public\javascripts" directory. Then in the application.js initialize it: $$(''a.someclass'').each(function(link){ new Control.Modal(link,{ opacity: 0.8, position: ''relative'', width: 300, height: 50 }); }); I have an action named "more" and its view "more.rhtml".In my product view,there is a link:<a class="someclass" href="more">link</a>. But when i click the link,this link behaviors like a normal link,not Pop-up a window.How do i manage it? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dont'' know if still usefull. If it behaves like a normal link there is an error in javascript or in loading the javascript file. Use a tool like firebug for firefox to check if everything is ok. On 18 Apr, 04:18, Guo Yangguang <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> An wrote: > > I use an unobtrusive approach, with this prototype library: > >http://livepipe.net/projects/control_modal/. > > > 1. Put a normal link in your view <a class="someclass" > > href="some_action">link</a>. > > 2. Then in the application.js just initialize it: > > > $$(''a.someclass'').each(function(link){ > > new Control.Modal(link,{ > > [...] > > }); > > }); > > hello: > I have downloaded the file "control.modal.2.2.3.js" and put it in > "public\javascripts" directory. Then in the application.js initialize > it: > $$(''a.someclass'').each(function(link){ > new Control.Modal(link,{ > opacity: 0.8, > position: ''relative'', > width: 300, > height: 50 > }); > }); > > I have an action named "more" and its view "more.rhtml".In my product > view,there is a link:<a class="someclass" href="more">link</a>. > But when i click the link,this link behaviors like a normal link,not > Pop-up a window.How do i manage it? > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---