Prototype Not Working in Window

When I try to use Ajax in a window openened by ‘window.open(’’);’
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:

Image Browser <%= javascript_include_tag '/admin/javascripts/prototype.js' %> Search: //<![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> ------------------------------------------------------------ <p>Many Thanks,<br> Mark</p>

This is really got me stuck - any ideas greatly appreciated!

Cheers Mark

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.

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.