Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window size problem 1

Status
Not open for further replies.

disfasia

Programmer
Apr 20, 2001
378
CA
I have a site I am trying to fix with various windows I have sized using the following scripts (for two different ones, for instance):

on (press) {
getURL ("javascript:NewWindow=window.open('french.html', 'newWin', 'scrollbars=yes,status=no,width=690,height=1300');");
}
 
Try this:

Use this scipt in you <head> tags:
*********************************'
<script language=&quot;JavaScript&quot;>
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+''
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function closeWin(NewWindow) {
NewWindow.close(); // close small window and depart
}

// End -->
</script>

***************
the beauty about this script is, that it also centers your pop-up window on the screen.


The event on your flash-button is then:

on (release) {
getURL (&quot;javascript:NewWindow('french.html','blaupop','500','500','yes')&quot;);
}


Greetings
 
dear nuah,

thanks so much for the advice! I worked brilliantly!

best,

disfasia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top