Results 1 to 4 of 4

Thread: open window without focus

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    how can i open a new window but not giving it the focus!

    here what i do right now:

    function oopenL(){
    window.open('http://100.100.100.78/clients/asp/lock.asp','_blank','width=100,height=100,left=3000,top=3000,menubar=0,location=0,toolbar=0,personalb ar=0,status=0,scrollbars=0,dependent=yes');
    }

    that way i don't see it but it has the focus so on the onLoad of the new window i put:
    onLoad="opener.focus();":
    this work but the problem is that my new window
    is an asp page and it can take about 2 to 5 second to load,
    so the onLoad event does not fire as soon as it open!!

    does somebody know what i could do!!!

  2. #2
    Lively Member Bios's Avatar
    Join Date
    Nov 1999
    Location
    Richton Park, IL, USA
    Posts
    71
    onLoad doesn't happen until the file is fully loaded instead just at the top of the document put:
    Code:
    <Script language="JavaScript">
    opener.focus();
    </Script>
    that way the second the browser gets to the first line of code (which is that) it will do it.

    Hope this helps,
    Bios
    Age: 17
    Languages: (Q)BASIC, Visual Basic, Dark Basic,C/C++, Visual C++, Perl, Java Script, HTML, ASP

    "DO:BEEP:LOOP"

  3. #3

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    tx, it make sense,i will try it monday morning!

  4. #4
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    NewPage = window.open('index.html', 'page')
    NewPage.blur();
    Kurt Simons
    [I know I'm a hack but my clients don't!]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width