Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    96
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Pop-up moveTo puzzle

    Hi.

    I have the following code for a pop-up window, but the window does not move as it should, as per the following function:

    Code:
    function newWindow(top, offset, id, guidestart) {
    	var top = top + 350;
    	var offset = offset + 200;	
       mywindow = window.open ("guide_noepg_draft.php?id="+id+"&guidestart="+guidestart+"", "mywindow", "location=1,status=1,scrollbars=1,width=700,height=300");
      mywindow.moveTo(offset, top);
    		
    }
    It moves down the page correctly but always appear at 0 on the left hand side.

    Any suggestions?

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Most modern day browsers do not allow you to move the window. Look in the settings of your browser and see if it is disabled.

    Why are you not setting top and left in the pop up code itself?

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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