Closed Thread Icon

Preserved Topic: So close, yet.... Pages that link to <a href="https://ozoneasylum.com/backlink?for=17896" title="Pages that link to Preserved Topic: So close, yet...." rel="nofollow" >Preserved Topic: So close, yet....\

 
Author Thread
Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-21-2000 04:23

Okay - working on this resizer script. It opens the window, and it appears that the width is correct, but not the height. If you choose 640x480, the window is obviously more than 480 tall. I can't figure out where it's getting the incorrect height from. Ideas? The script is at: http://development.runningwolf.com/development/code/page_resizer/index.html

The different methods I've tried are:

windowstring="toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width="+x+",height="+y;

windowstring='toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width="+x+",height="+y+"';

windowstring="toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width='+x+',height='+y+'";

{windowstring="toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width="+x+",height="+y+""};

windowstring="toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width='+x+',height='+y+';"

I'm new to programming in JS, so I'm sure it's something simple

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-21-2000 04:33

Hmmm, I'm stumped...

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-21-2000 04:44

I'm in trouble if you're stumped, Slime!

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

Babamba
Paranoid (IV) Inmate

From: my mother
Insane since: Aug 2000

posted posted 12-21-2000 13:33

lol

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-21-2000 21:13

Hah, how come whenever I give an answer, someone else comes in and says "no, slime's wrong, this is how you do it", but when I don't give an answer, no one says anything??? Hah! =)

OK, I saved it onto my comp to play around with it a bit, and found that if I took out everything from windowstring *except* for the width and height info, it worked right. Maybe one of those things causes it to add a little extra space.

So, now I'm setting each of them to "no" and i'm going to set them to "yes" one by one to see which messes it up.

Oh, you know what's happening? the height and width that you're specifying are the *inner* heights and widths! The toolbars and stuff are added on to the outside of your specified width and height.

Aha! This worked: I changed the words "width" and "height" to "outerwidth" and "outerheight." that fixed it. I'm not sure it will work in NN though... better do some testing. Good luck!

bunchapixels
Neurotic (0) Inmate
Newly admitted
posted posted 12-21-2000 21:53

no, slime's wrong.
this is how you do it:
:P
just jokes.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-22-2000 00:00

*nervous laughter*

bunchapixels
Neurotic (0) Inmate
Newly admitted
posted posted 12-22-2000 00:14

uh oh... that laughter kinda sounded maniacal... like the kinda laugh you hear just before a gun is pulled out...

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-22-2000 01:37

I changed the "width" and "height" to "outerwidth" and "outerheight". That didn't seem to fix things. It looks like the window is the correct width, but only about 1/2 as tall as it should be.

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 12-22-2000 15:28

I have an idea. How about, instead of loading the GN page, we load a simple yet stupid pahge that displays the innerwidth/outerwidth variables instead? This oughta help with the de-bugging.

<SCRIPT LANGUAGE = "JavaScript">
<!--
goodNN = (document.layers) ? 1:0;
goodIE = (document.all) ? 1:0;
document.write("- "+screen.width+" x "+screen.height+" pixels OA, ");
document.write(screen.availWidth+" x "+screen.availHeight+" available -<br>");
if (goodIE) {
document.write("- "+document.body.clientWidth+" x "+document.body.clientHeight+" browser size -<br>");}
if (goodNN) {
document.write("- "+window.innerWidth+" x "+window.innerHeight+" browser size -<br>");}

//-- end date and time script -->
</script>

Something like that, heh. The windows are definitely too tall in IE5.5, but I figger if we can see all of the variables it should be working with we can hopefully see what's happening.

Your pal, -doc-

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-22-2000 15:51

Okay, go to http://development.runningwolf.com/development/code/page_resizer/index.html - for the page name, use http://development.runningwolf.com/development/code/page_resizer/content.html, which has the code specified.
Trying 640x480, the results say
"- 800 x 600 pixels OA, 800 x 572 available -
- 624 x 499 browser size -"

Now, I have my resolution set to 800x600, so that might explain the overall setting.

Trying
800x600, results are
"- 800 x 600 pixels OA, 800 x 572 available -
- 784 x 619 browser size -"

etc, etc....

This is kinda interesting as we work with this.....


Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 12-22-2000 15:52

OK, check out http://primalshape.com/NewFolder/ - I seem to have something like this going there. What I need to add to the displayed page is all of the other variables for screen and browser size, and see if they display (and *what* they display as!)

Your pal, -doc-

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 12-22-2000 16:26

OK! Completely by accident, it started to work correctly in IE5.5. I have NO IDEA what I changed that made it behave differently, but differently it does. Check it out, it really seems to work.

In Netscape, we had the inner/outer width stuff, so I tested for it first to get the difference, and set the window to be that size, like this...

NN = (document.layers) ? 1:0;
if (NN) {
x = x - (window.outerWidth-window.innerWidth);
y = y - (window.outerHeight-window.innerHeight);
}

and it works there too. The IE part? Go figger.

Your pal, -doc-

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 12-22-2000 16:33

Yikes......

Glad it works, although I wish I understood better what it took to make it work....

Pat Richard
Web weenie
http://www.gurusnetwork.com
ICQ 23113317

« BackwardsOnwards »

Show Forum Drop Down Menu