Comment #5 on issue 1270 by richard.townsendrose: Javascript  
eventhandler 'onBlur' isnt't working on new windows completly generated by  
javascript
http://code.google.com/p/chromium/issues/detail?id=1270

Hi

we have exactly the same problem
works fine in firefox, opera, safari, and even ie6 and ie7.

seems it opens the new window, and closes it because the activity is still  
outwith
the new window. so may be focus is NOT getting trasnferred to the new  
window.

here's our js code.
/*************************************************************
The following function has been adapted from code at:
http://www.webapplikations.com/pages/html_js/image_examples/
OpenThumbnailImageFullSize.html
That code is copyrighted to webapplikations.com inc
*************************************************************/

/* megan changed width and height from 18 to 40 */
function ShowImage(ImageSrc) {
    var newImg = new Image();
    newImg.src = ImageSrc;
    newImg.style.border="0px";
    var winProps = "left=0, top=125, width="+(newImg.width+18)+",
height="+(newImg.height+18)+", scrollbars=yes, toolbar=no, directories=no,  
menu
bar=no, resizable=yes, status=no";

    newWin=window.open("","newWin",winProps);
    newWin.document.open();
    newWin.document.write('<html><head><title>TDOC Screen Shot - Please  
close after
review</title><link rel="shortcut icon" href="TDOC_FAV.ico"></head>');
    newWin.document.write('<body onBlur="javascript:window.close();">'); */
    newWin.document.write('<IMG id="TDOCImg" src="'+newImg.src+'"  
alt="Loading TDOC
Sreen shot"/>');
    newWin.document.write('</body></html>')
    newWin.document.close();
    newWin.focus();
}

you can see this in action at www.tdoc.net simply select overview, a  
quicklook,
choose any item and click the screen shot - up and gone in a nano second...

richard

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to