lhutton
asked on
Window Resize After Open
At http://boards.ancestry.com/mbexec?htx=board&r=rw&p=localities.oceania.newzealand.general the link "Links & Announcements" opens a window 360 x 400 in size, using the following script and link:
function Popup(sURL,sTitle,cx,cy){
if(screen){
leftPos=screen.width-cx-15 ;}
window.open(sURL,sTitle,"t oolbar=0,l ocation=0, status=0,m enubar=0,s crollbars= 1,resizabl e=1,top=0, left="+lef tPos+",wid th="+cx+", height="+c y).focus() ;}
javascript:Popup('http://boards.ancestry.com/mbexec?f=viewboard&r=rw&p=localities.oceania.newzealand.general','Info','360','400')
I want to insert code in the *opened* window to change the size of the window to 640 x 480. I don't have access to the first window, so can't change the script above that is used.
Is this possible?
function Popup(sURL,sTitle,cx,cy){
if(screen){
leftPos=screen.width-cx-15
window.open(sURL,sTitle,"t
javascript:Popup('http://boards.ancestry.com/mbexec?f=viewboard&r=rw&p=localities.oceania.newzealand.general','Info','360','400')
I want to insert code in the *opened* window to change the size of the window to 640 x 480. I don't have access to the first window, so can't change the script above that is used.
Is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
self.resizeTo(640,480);
also use :
self.moveTo(0,0)
self.moveTo(0,0)
yeah, just put this between <head> and </head> on the child webpage,
<script language="JavaScript">
window.resizeTo(640,480);
</script>
<script language="JavaScript">
window.resizeTo(640,480);
</script>
ASKER
Where do I put these?
ASKER
Ah, spoke too soon :) Thanks, James!
Reduced points for split.
Accepted avner's comment.
Points for james_beilby here.
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=javascript&qid=20169098
Lunchy
Friendly Neighbourhood Community Support Moderator
Accepted avner's comment.
Points for james_beilby here.
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=javascript&qid=20169098
Lunchy
Friendly Neighbourhood Community Support Moderator