Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Javascript: Window size? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 1117/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 06-24-04 10:39 AM Link | Quote
I'd like to be able to get the width and height of a Mozilla window. From what I hear, window.innerWidth and window.innerHeight hold this, but it doesn't seem to be working... the code 'alert(window.innerWidth+"x"+window.innerHeight)' puts out '85x0' when it's really somewhere along the lines of 1000x900.

[edit] Also, I wouldn't mind knowing how to convert a number back to an ASCII character (opposite of charCodeAt() function).


(edited by HyperHacker on 06-24-04 04:58 AM)
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 884/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 06-24-04 09:29 PM Link | Quote
where did you place this code? because window it is referencing could be not the window you are expecting. I coded some stuff for interaction with IE and that was the case, I had to call several parent windows before i got the actual window...

for convert number to ASCII, couldn't you just say char zero = 48? I think javascript should have some type right?
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 1124/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 06-25-04 04:38 AM Link | Quote
I've tried it in both the page I was using it on and the Javascript Console in Mozilla, both give the same result.
As for the ASCII thing, when I tried to do that, it just says 'char is a reserved identifier'.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 898/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 06-25-04 08:13 AM Link | Quote
char...if it isn't char, there has got to be some type in javascript that is char?

hmm...maybe you should look into the Mozilla support of javascript a little more... after all, window.innerWidth is a DOM query and maybe there are restrictions on this query...
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Javascript: Window size? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.004 seconds.