Hi, I''m trying to get a form to open up in a new window. I know how to toggle divs but haven''t been able to find anything on how to get another window to open...any ideas? Ron --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ron
2008-Jun-16  02:37 UTC
Re: Anybody know a prototype helper that creates a popup window?
So I realized after I posted this that thre is a :popup option in link_to. but for some reason when I add it to my links, it just loads a full page, not a popup. I''ve included javascript on my layouts...I heard somewhere that there is a prototype window--something different from a pop up window. Anybody know anything about that type of window? Ron On Jun 15, 7:26 pm, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m trying to get a form to open up in a new window. I know how to > toggle divs but haven''t been able to find anything on how to get > another window to open...any ideas? > > Ron--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jun-16  07:59 UTC
Re: Anybody know a prototype helper that creates a popup window?
On Jun 16, 3:37 am, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So I realized after I posted this that thre is a :popup option in > link_to. but for some reason when I add it to my links, it just loads > a full page, not a popup. I''ve included javascript on my layouts...I > heard somewhere that there is a prototype window--something different > from a pop up window. Anybody know anything about that type of > window? >window.open(url, ...) I suspect that when people mean prototype window they actually mean a chunk of html that has been styled to look like a window within the window (and normally scripted so that you can move it around, resize it etc...) Fred> Ron > > On Jun 15, 7:26 pm, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > I''m trying to get a form to open up in a new window. I know how to > > toggle divs but haven''t been able to find anything on how to get > > another window to open...any ideas? > > > Ron--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ron
2008-Jun-17  17:34 UTC
Re: Anybody know a prototype helper that creates a popup window?
Hi Fred, So I guess I''m not sure what the syntax would be? <%=link_to_remote ''Link'', "window.open(?)%> ? On Jun 16, 12:59 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jun 16, 3:37 am, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So I realized after I posted this that thre is a :popup option in > > link_to. but for some reason when I add it to my links, it just loads > > a full page, not a popup. I''ve included javascript on my layouts...I > > heard somewhere that there is a prototype window--something different > > from a pop up window. Anybody know anything about that type of > > window? > > window.open(url, ...) > > I suspect that when people mean prototype window they actually mean a > chunk of html that has been styled to look like a window within the > window (and normally scripted so that you can move it around, resize > it etc...) > > Fred > > > Ron > > > On Jun 15, 7:26 pm, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi, > > > > I''m trying to get a form to open up in a new window. I know how to > > > toggle divs but haven''t been able to find anything on how to get > > > another window to open...any ideas? > > > > Ron--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jun-17  19:43 UTC
Re: Anybody know a prototype helper that creates a popup window?
On 17 Jun 2008, at 18:34, Ron wrote:> > Hi Fred, > > So I guess I''m not sure what the syntax would be? > <%=link_to_remote ''Link'', "window.open(?)%> > ? >Nope, what you want is link_to_function (which is just fancy pants for <a onclick="..."> </a> Fred> On Jun 16, 12:59 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On Jun 16, 3:37 am, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So I >> realized after I posted this that thre is a :popup option in >>> link_to. but for some reason when I add it to my links, it just >>> loads >>> a full page, not a popup. I''ve included javascript on my >>> layouts...I >>> heard somewhere that there is a prototype window--something >>> different >>> from a pop up window. Anybody know anything about that type of >>> window? >> >> window.open(url, ...) >> >> I suspect that when people mean prototype window they actually mean a >> chunk of html that has been styled to look like a window within the >> window (and normally scripted so that you can move it around, resize >> it etc...) >> >> Fred >> >>> Ron >> >>> On Jun 15, 7:26 pm, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>>> Hi, >> >>>> I''m trying to get a form to open up in a new window. I know how to >>>> toggle divs but haven''t been able to find anything on how to get >>>> another window to open...any ideas? >> >>>> Ron > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ron
2008-Jun-19  17:13 UTC
Re: Anybody know a prototype helper that creates a popup window?
Okay Fred...that makes more sense.  That''s really helpful.  Thanks, as
always.
As for the Prototype windows, I''ve managed to get a nice window to
open using Prototype Window.  Its a really nice library that tacks on
to Prototype the ability to generate Prototype-based windows.  Its
here: http://prototype-window.xilinus.com/index.html
I included a couple of Javascript files in my javascript folder and
then defined a javascript variable in my view:
win = new Window({className: "mac_os_x", title: "Sample",
width:200,
height:150, destroyOnClose: true, recenterAuto:false});
win.getContent().update("<h1>Hello world !!</h1>");
Then I passed win.showCenter(); to a link_to_function tag:
<%=link_to_function ''Add Paper,''
"win.showCenter();"%>
Voila!  (This code, btw, is from the sample on Prototype Window''s
site).
There are several themes that you can use; I had to copy the
stylesheet to the public/stylesheets directory along with a directory
of image files for the particular theme.  I''m going to customize the
theme for my app; however, I was just trying to get started.
The only thing I''m not sure about here--maybe someone else knows--is
how to pass a Rails generated URL to the Window.  Right now, I can
only get it to show a div on the page or HTML I provide to it.  But
there is a getURL method that accepts a string argument that I''d like
to use.  When I try and put a link tag helper in, however, the script
doesn''t work.  I''m thinking maybe if I used RESTful routes,
the path
would be a string variable (if I''m not mistaken)--making it perhaps
acceptable as an argument.
Any ideas?  I mean, for this to work, its pretty important to be able
to show windows that have views in the Rails App.  I''ve got to figure
out how to get this going somehow.
Ron
On Jun 17, 12:43 pm, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> On 17 Jun 2008, at 18:34, Ron wrote:
>
>
>
> > Hi Fred,
>
> > So I guess I''m not sure what the syntax would be?
> > <%=link_to_remote ''Link'',
"window.open(?)%>
> > ?
>
> Nope, what you want is link_to_function (which is just fancy pants for
> <a onclick="..."> </a>
>
> Fred
>
> > On Jun 16, 12:59 am, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > wrote:
> >> On Jun 16, 3:37 am, Ron
<stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So I
> >> realized after I posted this that thre is a :popup option in
> >>> link_to.  but for some reason when I add it to my links, it
just
> >>> loads
> >>> a full page, not a popup.  I''ve included javascript
on my
> >>> layouts...I
> >>> heard somewhere that there is a prototype window--something
> >>> different
> >>> from a pop up window.  Anybody know anything about that type
of
> >>> window?
>
> >> window.open(url, ...)
>
> >> I suspect that when people mean prototype window they actually
mean a
> >> chunk of html that has been styled to look like a window within
the
> >> window (and normally scripted so that you can move it around,
resize
> >> it etc...)
>
> >> Fred
>
> >>> Ron
>
> >>> On Jun 15, 7:26 pm, Ron
<stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> >>>> Hi,
>
> >>>> I''m trying to get a form to open up in a new
window.  I know how to
> >>>> toggle divs but haven''t been able to find
anything on how to get
> >>>> another window to open...any ideas?
>
> >>>> Ron
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---