/    Sign up×
Community /Pin to ProfileBookmark

screen dimension checking code

I have a small webpage which checks for the dimensions of a screen before loading a website, then loading one (of several) which would fit the screen best. Originally this code was fine, until I decided to mesh with it some code that would open a window to specific dimensions and then some other code to remove scroll bars and menus… now leaving me just the lower option which works properly.

I would like to sort this out so that each page loads as it should, in accordance with the conditions. Presently only the bottom part of the code works:

“if (res!=’1′ && res!=’2′ && res!=’3′) PopupCenter (‘http://www.meta.projectmio.com/800.html’,’MyWindow’,800,531)”

So the window will open at 800×531 and load ../800.html, but the other conditions will not work, unless I c&p them to this lower part of the code. I think I’ve gotten something wrong.

website: [url]www.meta.projectmio.com/pop.html[/url]

Thanks.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@SpinnerApr 28.2010 — Well well, mister.

Your html-page is "lacking", at best.

You have no doctype, no html-tag, the body-tag is never closed, you have javascript written outside the <script> tags......

Go here: http://www.w3.org/MarkUp/Guide/

It might teach you how to create a html-page, which you certainly need to know if you plan on using javascript in a web-page.

Good luck!
Copy linkTweet thisAlerts:
@friggateauthorApr 28.2010 — You've got to ask yourself, do you think it would be like that if I knew what I was doing, if I had the first clue how to use w3.org...

I don't, I'm just trying to get things together, so some help would be appreciated ?
Copy linkTweet thisAlerts:
@SpinnerApr 28.2010 — And you've got to ask yourself if you should try to signup for the Indy500 before getting a drivers-license ?

Seriously though, I took the liberty of writing a little Basic HTML guide just now.

It could be ideal for a man like yourself.

http://christian.lassem.com/html/basic-html/

If that will not teach you anything, well, it's going to be a long night ?
Copy linkTweet thisAlerts:
@friggateauthorApr 29.2010 — Many thanks for the insight, this is a nice friendly page, I've seen similar before, so I'm not a complete beginner. I put my existing code in the correct area I think and now things must seem better, but I still come back to the JavaScript problem of how to get the resolution check to work properly.

I've been told that the method I am using to check aka available screen space, is not full proof, but would you say it was a pretty fair attempt?
×

Success!

Help @friggate spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...