Topic: browsercheck, check to see if javascript is enabled, flash detect, and screen resolution (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=28912" title="Pages that link to Topic: browsercheck, check to see if javascript is enabled, flash detect, and screen resolution (Page 1 of 1)" rel="nofollow" >Topic: browsercheck, check to see if javascript is enabled, flash detect, and screen resolution <span class="small">(Page 1 of 1)</span>\

 
ridinglowest
Obsessive-Compulsive (I) Inmate

From: purgatory
Insane since: Jul 2005

posted posted 02-11-2007 01:28

I am trying to find and create a script that browser checks, checks to see if javascript is enabled, flash detect, and what the screen resolution is.

Also if the browser is mozzilla do nothing, but if anyother alert(message).
If javascript is enabled do nothing if it is not, alert(message);
third if flash 8 or higher is there cool proceed. if not redireet in separte window adobe flash download and alert(plaes go to the popup[ and download and install flash.)
last if screen is small than 1024x768 than alert(message).

at the end if the browser is mozzilla, javascript is enabled, flash 8 or higher is there, and the screen res is 1024x768 or higher
than in the same window go to home.asp.

I have tried and dosent work right now I have 5 separte funtions and its okay but if this could be in one function that would be cool. thanks for whomever can help.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 02-11-2007 08:58

Ring! ring! It's 1996 calling. Give me my homepages back or else.

What kind of application/site do you write to have such requirements ?

quote:
Also if the browser is mozzilla do nothing, but if anyother alert(message).

What does mozilla do that other browsers such as IE6/7, Safari, Opera, Omniweb, Konqueror, ... don't ? You should definitely do features detection instead of browser detection. Also the kind of function you want is the very reason why it's so easy today to spoof the UA string.

quote:
If javascript is enabled do nothing if it is not, alert(message);

Easy:

code:
<noscript><script language='javascript'>
document.write( '<scr'+'ipt>alert(message)</scr'+'ipt>')
</script></noscript>

I hope you can see the irony here. Actually I've seen such absurdities in the the wild a few times.

quote:
last if screen is small than 1024x768 than alert(message).

Since when the screen resolution meant anything WRT to the resolution of the browser windows ? FYI my laptop is in 1024x768, my browser is maximised and my windows/tabs are maximixed, the windows/tabs are 822x652. If a page needs a horizontal scrollbar I make it Fit-To-Width or Zoom it out to 80 or 90%

quote:
I have tried and dosent work right now I have 5 separte funtions and its okay but if this could be in one function that would be cool. thanks for whomever can help.

Make your 5 function true or false depending if the requirement tested is met or not then combine the calls in one function:

code:
function allTestInOne()
{
  var goOn = false;
  goOn = testRequirement1()
  if( goOn )
    goOn = testRequirement2()
  if( goOn )
    goOn = testRequirement3()
  if( goOn )
    goOn = testRequirement4()
  if( goOn )
    goOn = testRequirement5()
  if( goOn )
    self.location.replace( 'home.asp' )
  else
    self.location.replace( 'http://www.w3.org/WAI/' )
}

Hope you'll reconsider at least some of your requirements.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 02-11-2007 17:42

s/function/functions return

ridinglowest
Obsessive-Compulsive (I) Inmate

From: purgatory
Insane since: Jul 2005

posted posted 02-13-2007 04:32

awsome thnaks and its my personal site and I designed it for mozzilla casue I prefer it, and I guess I dont need the scrren res casue ur right. but java and flash are inportant. but thank you very much. I ts greatly appreciated .

from your fellow inmate

Iron Wallaby
Paranoid (IV) Inmate

From: USA
Insane since: May 2004

posted posted 02-13-2007 06:10

Just because you prefer Mozilla doesn't mean you should force your preferences on everyone else. There are plenty of great browsers that many use on a regular basis (Firefox, Opera, Konqueror, Safari)... so purposefully making your site only work in one is not just irresponsible, but it shows that you don't care about your readers. And if you don't care about them, why should they visit your site?

/rant

---
Website

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 02-13-2007 10:37

Progressive enhancement!

Build the site from teh ground up and unobtrusively add the features and candy you desire, the best written sites don't rely on the technology they use. they are semantically written, simple to use and functional.

Consider creating the journey through your site without any whistles and bells, (for example links to downlaodd code instead of showing it in the browser). Then using JavaScript unobtrusively add hooks to give the user the extra eye candy and functionality.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 02-13-2007 10:51



I'm appalled by such a narrow minded view of the web. It's 2007, 21st century and stuff. Not 1997, this site works best in Internet Explorer 4 in 1024x768 and other crap. Should I unleash some of the accessiblity and standards pitbulls we have at work. Seriously, there is ONE web. No one should single out users for the browser, platform, ... they use.



(Edited by poi on 02-13-2007 11:04)

Moon Shadow
Paranoid (IV) Inmate

From: Paris, France
Insane since: Jan 2003

posted posted 02-13-2007 20:43

Perhaps ridinglowest is trying to do a remake of this


More seriously,

My first site had a welcome page filled with java, javascript, that horrible "click here to enter the website" link; and the rest of the website was all about frames and iframes.

I scared you, did I ?

When you're new to html, there's nobody to tell you what is good and what is wrong. Good sites, bad sites, can you tell the difference ?

Even now in 2007, I'd say somebody beginning in html and looking for a tutorial has more than 50% chance to end up on a good old html 3.0 website praising table design and all. I tried modern web design on Google, and the first link that came up was about designing with tables.

The web has evolved since 1997, but most websites have not.
-- I personally blame IE for that, but that's just my opinion --

So yeah, this kind of view is quite irritating, but I'd guess we can't blame him for not knowing about good web design practices. Reading the topics at the Asylum will probably be a good start for him ^^

----
If wishes were fishes, we'd all cast nets.



(Edited by Moon Shadow on 02-13-2007 20:46)

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 02-14-2007 13:41
quote:
The web has evolved since 1997, but most websites have not.
--I personally blame IE for that, but that's just my opinion--

I blame lazy developers!



(Edited by Blaise on 02-14-2007 13:42)

swimmer5555
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Apr 2011

posted posted 04-21-2011 01:58

A good site which checks your browser support for javascript and also tells you the version is www.IsMyJavaScriptEnabled.com

(Edited by swimmer5555 on 04-21-2011 01:59)

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

posted posted 05-31-2011 11:00
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu