In the case you can not, or would prefer not to modify the body tag,
window.onload is a good solution.

<script>
function NewWindow(mypage, myname, w, h, scroll) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
  win = window.open(mypage, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
window.> </script>

--
jon
mailto:[EMAIL PROTECTED]

Wednesday, November 12, 2003, 12:52:44 PM, you wrote:
B> Hi,

B> I have the following code in my index.cfm file. Then the index.cfm gets loaded I want it to automatically load the new window without having to click the link on the page.

B> How?

B> --html--

B> <body>

B> <HEAD>
B> --SCRIPT LANGUAGE="_javascript_"--
B> <!-- Begin
B> function NewWindow(mypage, myname, w, h, scroll) {
B> var winl = (screen.width - w) / 2;
B> var wint = (screen.height - h) / 2;
B> winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
B> win = window.open(mypage, myname, winprops)
B> if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
B> }
//  End -->>
B> --/script--
B> </HEAD>

B> </body>

B> --/html--

B> <a href="" false;">Load</a>



B>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to