Reviews, updates and in depth guides to your favourite mobile games -
Forum Home Latest Posts Search Help Subscribe

javascript question

Page: 1 Reply
Dec 20th 2003#134328 Report
Member since: Mar 29th 2003
Posts: 1326
I know nothing about Javascript.

I want to make a site that has a splash page, with "enter here" on it. When you click on that, a new window pops up (preferably in the middle of the screen) that is 500x500(?) and has as little chrome as possible on it. I'm going to have like a little slideshow, with a starter page, 16 photos, and end page. Each time you click the image, it will advance to the next image.

The thing that I'm worried about is how big to make window. My pictures are 500x500, so does the window need to be bigger, to account for the title bar and edges, etc.? How do I account for different browser's edge widths? Or does window mean the viewable space inside?

And what code do I need for the non-chromed smaller window pop-up?

Reply with Quote Reply
Dec 21st 2003#134390 Report
Member since: Nov 6th 2001
Posts: 240, search for chromeless, javascript, popup windows ....
Reply with Quote Reply
Dec 21st 2003#134399 Report
Member since: Mar 29th 2003
Posts: 1326
yeah yeah yeah *sheepish grin*


go to javascript pop-up

click here


How do I get the pop-up not to have scrollbars? Just dont include that word and the comma? Or what?

And is 500x500 the size of the internal space? Or the size of the window, chrome and everything? I want my 500x500 pictures to look nice inside the window ... you know what I mean, right?

Reply with Quote Reply
Dec 21st 2003#134404 Report
Member since: Mar 24th 2002
Posts: 3114
the size will be the area itself, excluding the chrome. So a 500*500px image will be a perfect fit in the window.
(in IE, at least)

And remove the "scrollbars", and there should be no scrollbars.
If not, you can put "scrollbars=no" or something similar. Just test it out before asking here? Takes five minutes to type everything out, vs three seconds of editing the code, saving, refreshing. :p
Reply with Quote Reply
Dec 21st 2003#134406 Report
Member since: Jun 20th 2003
Posts: 1203

<script language="JavaScript" type="text/javascript">
// pop up script
var win = null;
function newWindow(mypage,myname,w,h,features) {
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win =,myname,settings);
// -->


<a href="#null" class="linkclasshere" onClick="newWindow('/image/path/here.gif','','600','450')">



Use this.

Gotta go to the movies, BRB in a couple hours if you need some help.
Reply with Quote Reply
Dec 21st 2003#134407 Report
Member since: Mar 29th 2003
Posts: 1326
Its not working, telemahkos :D
Thanks Paavo - I appreciate it
- tom
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum