When I try to use Ajax in a window openened by ''window.open(''<url>'');'' it doesn''t work. There is no exceptions raised as far as I can see (debugging with FireBug). However, if I refresh the window once it has popped up it does work. Is there something I''m missing? Code in my popup window: ------------------------------------------------------------ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Image Browser</title> <%= javascript_include_tag ''/admin/javascripts/prototype.js'' %> </head> <body> Search: <input type="text" id="search" name="search" /> <script type="text/javascript"> //<![CDATA[ new Form.Element.Observer( ''search'', 0.5, function(element, value) { new Ajax.Updater( ''items'', ''/admin/browser/items?item_type=ImageAsset'', { asynchronous: true, evalScripts: true, parameters: ''search='' + escape(value) } ) }); //]]> </script> <div id="items"></div> </body> </html> ------------------------------------------------------------ Many Thanks, Mark -- 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 -~----------~----~----~----~------~----~------~--~---
This is really got me stuck - any ideas greatly appreciated! Cheers Mark -- 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 -~----------~----~----~----~------~----~------~--~---
Use the web browser to find out, for sure, what the URL is of your popup window after it opens. View source to see what the javascript tag looks like. Combine the two in your head to ensure that the .js file is reachable by the combined URL. One other suggestion - please, please do not ''bump'' your post to the top after only 50 minutes of waiting. That''s just rude. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Phrogz wrote:> Use the web browser to find out, for sure, what the URL is of your > popup window after it opens. View source to see what the javascript tag > looks like. Combine the two in your head to ensure that the .js file is > reachable by the combined URL. > > One other suggestion - please, please do not ''bump'' your post to the > top after only 50 minutes of waiting. That''s just rude.Thanks for this suggestion, but the URL isn''t the problem as I''ve tried pasting the JS source in and still no avail. Also, apologies for re-posting so soon. -- 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 -~----------~----~----~----~------~----~------~--~---