Loading a popup on url submit

hey folks,
i know there is a onload DOM. but what i want is when someone type in url of my website. my website should open in new window.for now i m using a function on submit button which after clicking login loads the app in new window. now i want when a user enter url for my site the website shld open in new window. shld i use window.onload or body.onload

Question: When your site opens in a new window, how is your site in the new window going to know that it doesn’t need to reopen in a new window?

There is a danger of forever opening new windows.

Normally when you want to open a new window you would use a splash page with a button that opens the window when clicked on. This gets around both the infinite loop mentioned by pmw75, as well as not triggering popup blockers which dislike popups onload.

have a body onload tag on first page?

Answer: On one page suppose on index page there will be function that has only e.g body onload function. the other pages don’t. so how would it open/forever loop is every new window. i won’t be calling that onload function everytime. it will be only one time i.e on index page

That is good to hear. The impression that was gained from the first post is that you were wanting every every page of your web site to ensure that it was in the same new window.

I’m glad that such complications aren’t going to be necessary.