I am using the stripes framework and I''m stuck on a problem that I''m hoping prototype can resolve. In a parent window I use javascript to open up a second window pop-up that contains a textarea and a submit button. When I click on the submit button I execute a stripes actionBean that updates the database and closes the pop-up window. The parent window is still up and I am wondering how to get the parent window that is already active updated. Can Ajax.Updater help with that? I''ve tried a suggestion of having a floating div with a textarea but have not been able to make that work. Any suggestions or direction would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You don''t need any library to do that. When your popup window refreshes, send something like this : <html> <head> </head> <body onload="doLoad();"> <script type="text/javascript"> if ( window.opener ) { window.opener.refresh(); } window.close(); </script> </body> </html> That will refresh the parent window (if there''s one), then close itself. -yanick On 1 mai, 10:14, mel <melindasa...-8+6JQYGtvszCgGqN69JWhQ@public.gmane.org> wrote:> I am using the stripes framework and I''m stuck on a problem that I''m > hoping prototype can resolve. > > In a parent window I use javascript to open up a second window pop-up > that contains a textarea and a submit button. When I click on the > submit button I execute a stripes actionBean that updates the database > and closes the pop-up window. > > The parent window is still up and I am wondering how to get the parent > window that is already active updated. Can Ajax.Updater help with > that? > > I''ve tried a suggestion of having a floating div with a textarea but > have not been able to make that work. > > Any suggestions or direction would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yanick, Thanks so much. I will try this. Regards. -----Original Message----- From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Yanick Sent: Tuesday, May 01, 2007 10:40 AM To: Ruby on Rails: Spinoffs Subject: [Rails-spinoffs] Re: Question on using prototype You don''t need any library to do that. When your popup window refreshes, send something like this : <html> <head> </head> <body onload="doLoad();"> <script type="text/javascript"> if ( window.opener ) { window.opener.refresh(); } window.close(); </script> </body> </html> That will refresh the parent window (if there''s one), then close itself. -yanick On 1 mai, 10:14, mel <melindasa...-8+6JQYGtvszCgGqN69JWhQ@public.gmane.org> wrote:> I am using the stripes framework and I''m stuck on a problem that I''m > hoping prototype can resolve. > > In a parent window I use javascript to open up a second window pop-up > that contains a textarea and a submit button. When I click on the > submit button I execute a stripes actionBean that updates the database> and closes the pop-up window. > > The parent window is still up and I am wondering how to get the parent> window that is already active updated. Can Ajax.Updater help with > that? > > I''ve tried a suggestion of having a floating div with a textarea but > have not been able to make that work. > > Any suggestions or direction would be appreciated.The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yanick, Please forgive these questions but needing some javascript help as I am no javascript expert, where is doLoad()? Also, would not having doLoad in the onload of the body close the pop-up window after the form is loaded. Can I put this script in a function and call it from an onsubmit within the form tag? Your help is appreciated. Regards. -----Original Message----- From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Yanick Sent: Tuesday, May 01, 2007 10:40 AM To: Ruby on Rails: Spinoffs Subject: [Rails-spinoffs] Re: Question on using prototype You don''t need any library to do that. When your popup window refreshes, send something like this : <html> <head> </head> <body onload="doLoad();"> <script type="text/javascript"> if ( window.opener ) { window.opener.refresh(); } window.close(); </script> </body> </html> That will refresh the parent window (if there''s one), then close itself. -yanick On 1 mai, 10:14, mel <melindasa...-8+6JQYGtvszCgGqN69JWhQ@public.gmane.org> wrote:> I am using the stripes framework and I''m stuck on a problem that I''m > hoping prototype can resolve. > > In a parent window I use javascript to open up a second window pop-up > that contains a textarea and a submit button. When I click on the > submit button I execute a stripes actionBean that updates the database> and closes the pop-up window. > > The parent window is still up and I am wondering how to get the parent> window that is already active updated. Can Ajax.Updater help with > that? > > I''ve tried a suggestion of having a floating div with a textarea but > have not been able to make that work. > > Any suggestions or direction would be appreciated.The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yeah, sorry about that :) I wrote that quite fast didn''t I ? the code should have been : <html> <head> </head> <body onload="doLoad();"> <script type="text/javascript"> function doLoad() { if ( window.opener ) { window.opener.refresh(); } window.close(); } </script> </body> </html> TIP : you should only call functions directly inside HTML elements. So, you should not do : <body onload="alert(''loaded'');"> but instead <body onload="doLoad();"> (or some other function) and declare "doLoad" in a script tag. -yanick On 1 mai, 12:06, "Savoy, Melinda" <MelindaSa...-8+6JQYGtvszCgGqN69JWhQ@public.gmane.org> wrote:> Yanick, > > Please forgive these questions but needing some javascript help as I am > no javascript expert, where is doLoad()? Also, would not having doLoad > in the onload of the body close the pop-up window after the form is > loaded. > > Can I put this script in a function and call it from an onsubmit within > the form tag? > > Your help is appreciated. Regards. > > -----Original Message----- > From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Yanick > Sent: Tuesday, May 01, 2007 10:40 AM > To: Ruby on Rails: Spinoffs > Subject: [Rails-spinoffs] Re: Question on using prototype > > You don''t need any library to do that. When your popup window refreshes, > send something like this : > > <html> > <head> > </head> > <body onload="doLoad();"> > <script type="text/javascript"> > if ( window.opener ) { > window.opener.refresh(); > } > window.close(); > </script> > </body> > </html> > > That will refresh the parent window (if there''s one), then close itself. > > -yanick > > On 1 mai, 10:14, mel <melindasa...-8+6JQYGtvszCgGqN69JWhQ@public.gmane.org> wrote: > > I am using the stripes framework and I''m stuck on a problem that I''m > > hoping prototype can resolve. > > > In a parent window I use javascript to open up a second window pop-up > > that contains a textarea and a submit button. When I click on the > > submit button I execute a stripes actionBean that updates the database > > > and closes the pop-up window. > > > The parent window is still up and I am wondering how to get the parent > > > window that is already active updated. Can Ajax.Updater help with > > that? > > > I''ve tried a suggestion of having a floating div with a textarea but > > have not been able to make that work. > > > Any suggestions or direction would be appreciated. > > The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Gday Mel, Maybe try adding an onsubmit function to the form in the popup that calls a function in the parent? Something like: <form onsubmit="window.parent.updateSomething($F(''textAreaID''))"> and on the parent: function updateSomething(newText) { Element.update(''divToUpdate'', newText); } I dont know what the stripes framework is, but this might point you in the right direction. Goodluck, Keith mel wrote:> I am using the stripes framework and I''m stuck on a problem that I''m > hoping prototype can resolve. > > In a parent window I use javascript to open up a second window pop-up > that contains a textarea and a submit button. When I click on the > submit button I execute a stripes actionBean that updates the database > and closes the pop-up window. > > The parent window is still up and I am wondering how to get the parent > window that is already active updated. Can Ajax.Updater help with > that? > > I''ve tried a suggestion of having a floating div with a textarea but > have not been able to make that work. > > Any suggestions or direction would be appreciated. > > > > >-- MindVision Interactive Ph: (08) 8212 9544 Fax: (08) 8212 9644 E-Mail: keith-ildoxR50Kj+k+/BmZukYBiV4CK0nxESZKQEueVp/e6I@public.gmane.org Web: www.mindvision.com.au --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---