Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Sat Nov 21, 2009 12:11 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ]  Bookmark and Share
Author Message
 Post subject: Screen Resolution Checker (V. Simple)
PostPosted: Fri Feb 29, 2008 9:19 pm 
Offline
User avatar

Joined: Tue Feb 26, 2008 10:27 pm
Posts: 22
http://www.js92.110mb.com/
At the bottom that website, there is some text: 'Check Your Screen Resolution Here!' Click that and a pop up message will tell you your exact screen size!
This is the code for it:
Code:
<a href="javascript:alert('Your resolution is '+screen.width+'x'+screen.height);">Text Goes Here!</a>

A pretty simple code and probably not even majorly required but atleast you can have this cool feature on your website!
Thanks for viewing this thread :D

_________________
NoCostGaming.co.uk - Please Sign Up


Top
 Profile  
 
 Post subject: Re: Screen Resolution Checker (V. Simple)
PostPosted: Wed Feb 11, 2009 1:02 am 
Offline
User avatar

Joined: Tue Feb 26, 2008 10:27 pm
Posts: 22
omg nearly 1000 views and no reply!!!

_________________
NoCostGaming.co.uk - Please Sign Up


Top
 Profile  
 
 Post subject: Re: Screen Resolution Checker (V. Simple)
PostPosted: Wed Feb 11, 2009 1:59 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
Were you expecting for a response?

Anyway, let me poke myself in, and give you some feedback.

1. javascript pseudo-url is deprecated and shouldn't be advocated. Also, it will make your page invalid.

2. How would that link go when the user has JS disabled? They will see a dead link. I suggest you write that part of the markup with JS too so that when users has JS disabled, they wouldn't see that part of your page.

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
 Post subject: Re: Screen Resolution Checker (V. Simple)
PostPosted: Wed Feb 11, 2009 2:00 am 
Offline
1000+ Club

Joined: Thu May 31, 2007 4:28 pm
Posts: 1204
Location: Belfast, Northen Ireland
What is there to reply to? You're not asking a question and if people are using it they're clearly not having problems.


Top
 Profile  
 
 Post subject: Re: Screen Resolution Checker (V. Simple)
PostPosted: Wed Feb 11, 2009 11:37 pm 
Offline
500+ Club
User avatar

Joined: Thu Jan 25, 2007 2:10 pm
Posts: 691
Location: Midlands, England
rangana wrote:
1. javascript pseudo-url is deprecated and shouldn't be advocated. Also, it will make your page invalid
What is the "correct" way of doing it? onClick?

Flabby Rabbit

_________________
http://www.hackthis.co.uk


Top
 Profile  
 
 Post subject: Re: Screen Resolution Checker (V. Simple)
PostPosted: Thu Feb 12, 2009 1:50 am 
Offline
500+ Club
User avatar

Joined: Wed Feb 27, 2008 6:14 am
Posts: 929
Location: Cebu City Philippines
Yes Flabby.

The main purpose of using javascript pseudo-url is just to cancel the tags (<a>) native behavior - which is redirection.

To cancel the tags nature behavior, we can add return false at the end of the code, or use DOM's preventDefault().

Hope that makes sense.

_________________
~ Get me some work, I do freelancing ~


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley