HighDots Forums  

Re: Javascript error message using <meta> tags

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Javascript error message using <meta> tags in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Taras_96
 
Posts: n/a

Default Re: Javascript error message using <meta> tags - 11-02-2006 , 01:48 AM






Quote:
No, it reacts to a confirmation of the features I want.
Which in this case, the 'confirmation of the features' is the normal
flow of the program.

Quote:
In your case,
the feature you want is JS enabled. The only way to know if that feature
is available is to test for it. Then use it. And only JS can tell you
that. You are trying to test for the lack of a feature that needs the
feature to tell you if it's there or not.

Fair enough

Quote:
Actually, you don't. You include a snippet of script in every page that
hides a div tag wrapped inside the body, with a message above it. Script
would hide the message and show the body div. Without script, or with an
...
Good idea

Quote:
Probably closer to 99% of the users and 99% of those users won't even
know what JS is or how to disable it. So, you are trying to cover .01%
of your users.
I was more coming from the point that some of these people read a 'how
to secure your browser' guide or something similar, which told them to
disable javascript.

Quote:
Never used a Cell Phone Browser then I assume?

The website is not suitable for the small screen sizes in Cell Phones -
we thought about this, and couldn't foresee the site being used via a
mobile phone.


Quote:
Why? Half the porn sites I see start off as an innocent site that
redirects to the real porn using META redirects.
Point taken

Quote:
The biggest problem with NOSCRIPT isn't support or lack of support, it
is in the inadequacy of the element. If a page has a JS error in it -
for any reason - the JS enabled browsers won't get anything but the
error message.

I tried this out with different js errors, and for all of the cases the
NOSCRIPT block never showed. I tried calling non-existant functions,
syntax errors in onclick handlers, and syntax errors in <script> blocks
in the head, and none of the errors resulted in showing what was in the
NOSCRIPT block. So what errors result in the behavour described above?
I'm running FF 1.5

Taras



Reply With Quote
  #2  
Old   
Randy Webb
 
Posts: n/a

Default Re: Javascript error message using <meta> tags - 11-02-2006 , 02:25 AM






Taras_96 said the following on 11/2/2006 1:48 AM:

<snip>

Quote:
The biggest problem with NOSCRIPT isn't support or lack of support, it
is in the inadequacy of the element. If a page has a JS error in it -
for any reason - the JS enabled browsers won't get anything but the
error message.


I tried this out with different js errors, and for all of the cases the
NOSCRIPT block never showed. I tried calling non-existant functions,
syntax errors in onclick handlers, and syntax errors in <script> blocks
in the head, and none of the errors resulted in showing what was in the
NOSCRIPT block. So what errors result in the behavour described above?
I'm running FF 1.5
There are three scenarios that can happen when a script page opens:

1) The script executes as expected - all is fine.
2) Script is disabled.
3) There is a script error during page load.

Script handles the first scenario.
NOSCRIPT attempts to handle the second one.

How do you deal with the third one? If Scripting is enabled, NOSCRIPT
will never show up. But if the content of the page is generated by
script and there is an error, then no content gets generated. The user
is left scratching the head and wondering "What the hell is going on?".
The snippets I gave you to use cover the third scenario. And if you
notice, my snippets don't have a NOSCRIPT element in them.

Think about an AJAX driven site (even though I am not an AJAX fan),
where the page gets created after it loads using an XMLHTTPRequest
object and the users browser doesn't support it. If the script is
written not to error out (using feature detection), then the user won't
get a page because the browser doesn't support it, they won't get the
noscript because script is enabled. The *only* solution to that is to
put the message in the page and then hide it with script.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.