cScript = cScript + "window.parent.oDiv=window.parent.document.createElement(""div"")" + oApp.cCR ' Use to have a universal way to add support for set focus on the div ' This is cross browser ' This allows to press Esc immediately ' This avoids the Enter key, when the div is active, on Firefox, to bring the user to the home page ' This avoids the div to bounces the Html content to the right if the browser is not wide enough cScript = cScript + "window.parent.oDiv.tabIndex=-1" + oApp.cCR cScript = cScript + "window.parent.document.body.appendChild(window.parent.oDiv)" + oApp.cCRThen, in pretty much the same section, down below, when I have finished aligning my div, I have this to set the focus:
cScript = cScript + "window.parent.oDiv.focus()" + oApp.cCRInternet Explorer does not require the middle section to work. However, having it there will make it ok with Firefox, Google Chrome and Safari.