Focus after attachURL()

If i create a window, and load it with attachURL(), how can I give the window focus() after the URL is loaded?

Where exactly you want a focus? On the window?
Could you provide code snippets?

After displaying the window, I want the contents to receive focus (so user can scroll, etc, without having to mouse into it first)

Here is a code snippet (simplified):

	                    if (dhxWins == null) {
	                        dhxWins = new dhtmlXWindows();
	                    }
	                    if ( dhxWins.isWindow("PackageSource") == false) {
	                        win = dhxWins.createWindow("PackageSource", 0, 0, 600, 600);
	      	                win.centerOnScreen();
	      	                win.setModal(false); 
                                win.denyPark();       
	      	                win.button("close").attachEvent("onClick",function() {
	      	                    win.setModal(false);
	      	                    win.hide();
	      	            	});
	                    } else {
	                        win = dhxWins.window("PackageSource");
	                    }
   	      	            win.setModal( false);  
   	                    win.show();

   	      	            win.setText(msg_showpackagesource);
       	            	    win.attachURL(myURL);  // some external URL

                           // After loading data (which could take some time), I want to set
                           // focus in the contents of the window.

What kind of URL you gonna attach? Will it be dhtmlx components or something else? Recommend you to set focus on some elements in this attached page,

How do I know when attachURL is complete? I don’t think I can add an embedded function body to receive control once the URL has been loaded, can I?

Window hasn’t focus (if you mean this). You need to set focus to some element from attached content.