Results 1 to 2 of 2

Thread: Open window in same location each time.

  1. #1
    Join Date
    Oct 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Open window in same location each time.

    I am using microsoft agent to tell Bible stories on our church web site. I am using the window.open command to open a window in which the story is told. However, inorder to locate the characters correctly, I need to have the window open in the top left corner each time. Here is the code I am using (excluding the Form for the button)

    function smallwin(targeturl){
    window.open(targeturl,"","width=750,height=550","top=0,left=0")

    While this opens a new window of the proper size, its location can be anywhere on the screen which makes it impossible to position the agents within the new window. The "top and left" commands do not seem to effect where the window is located. Do I have the parameters in the wrong order?
    So, how do I get the window to open in the top left hand corner each time?

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Code:
    function smallwin(var url = '') {
       openIt = window.open(url, "_NAME_OF_WINDOW_", "width=750,height=550,top=0,left=0");
       openIt.focus();
    }
    dont put them in separated... the toolbar properties are all in the same argument

    also you should define the window that you are opening it in, which will give you that ability to access that window later to either re-populate it with some different data, or to close the window dynamically etcetc...

Bookmarks

Posting Permissions

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