file1: dummy.html (empty file) file2: image.png (any image) file3: test.html <html> <head> <script type="text/javascript"> var win; var image = 'image.png'; function set_popup_background() { win.document.body.style.backgroundImage = "url(\'" + image + "\')"; return true; } function popup() { win = window.open('dummy.html', 'test', 'width=250, height=200, toolbar=no, resizable=no, scrollbars=no'); var img = new Image(); img.src = image; img.onload = set_popup_background; } </script> </head> <body> <a href="#" onClick="javascript: popup();">popup</a> </body> </html> --- To reproduce: 1) Put all the files in the same folder. 2) Open test.html with any webkit browser 3) Click on the 'popup' link (popup window opens with the background picture set just fine) 4) Close the popup box 5) Click on the same link (popup window opens but no background set) I've tested it on Opera(linux) and Safari(win XP). FF and IE browsers work fine.
Created attachment 25272 [details] image
Created attachment 25274 [details] dummy
Created attachment 25275 [details] test
Works for me, please reopen if this still repros for you.