473,378 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

checking out if their U-A/browser settings support JavaScript, java, ...

..
Does anyone know of a smart way to do it?
..
There are plenty of users that don't support java, javascript and/or
AJAX's XMLHTTPRequest (people with handhelds, PDAs and ...) my app
would serve them basically the same page, but without the same
functionality
..
I am looking for ideas from people who have dealt with these issues.
..
Anyone?
..
Thanks
onetitfemme

Apr 4 '06 #1
5 1883
onetitfemme said the following on 4/4/2006 11:14 AM:
..
Does anyone know of a smart way to do it?
To do what?
..
There are plenty of users that don't support java, javascript and/or
AJAX's XMLHTTPRequest (people with handhelds, PDAs and ...) my app
would serve them basically the same page, but without the same
functionality


Have your non-JS version the page people visit first. Then, use
Javascript to redirect them to the JS version. If JS is not present,
then they get the non-JS version. Or, you simply take the non-JS version
and enhance it using JS so that it doesn't matter - 1 page. It is what
is referred to as "degrading gracefully".

As for Java, that is a different question all together and you will
probably get better advice on Java questions in comp.lang.java and it's
heirarchy.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 4 '06 #2
JRS: In article <Rr******************************@comcast.com>, dated
Tue, 4 Apr 2006 15:31:54 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :

Have your non-JS version the page people visit first. Then, use
Javascript to redirect them to the JS version. If JS is not present,
then they get the non-JS version. Or, you simply take the non-JS version
and enhance it using JS so that it doesn't matter - 1 page. It is what
is referred to as "degrading gracefully".


UNTESTED :

ISTM that one can write a small page that expects to be called as
thispage.htm?thatpage.htm .

Page index.html uses javascript to call thatpage.htm immediately, and if
thatpage.htm is not supplied it likewise calls index.htm, perhaps after
a second's delay.

It also contains HTML text saying :-

"Some of my pages need javascript, which you do not have enabled. For
the index page, <a href="index.htm">select</a>.

It could also contain a META redirecting to index.htm after one or more
seconds.

The above is related to my "Frame This" code (frames-4.htm).

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Apr 5 '06 #3
Dr John Stockton said the following on 4/5/2006 11:14 AM:
JRS: In article <Rr******************************@comcast.com>, dated
Tue, 4 Apr 2006 15:31:54 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Have your non-JS version the page people visit first. Then, use
Javascript to redirect them to the JS version. If JS is not present,
then they get the non-JS version. Or, you simply take the non-JS version
and enhance it using JS so that it doesn't matter - 1 page. It is what
is referred to as "degrading gracefully".
UNTESTED :

ISTM that one can write a small page that expects to be called as
thispage.htm?thatpage.htm .

Page index.html uses javascript to call thatpage.htm immediately, and if
thatpage.htm is not supplied it likewise calls index.htm, perhaps after
a second's delay.


That is very possible and not that difficult to implement. But unless
thatpage.htm is used as a parameter to the page, whats the point if you
are going to redirect to another page without it. Two different pages
based on a parameter implies the parameter means something?
It also contains HTML text saying :-

"Some of my pages need javascript, which you do not have enabled. For
the index page, <a href="index.htm">select</a>.

It could also contain a META redirecting to index.htm after one or more
seconds.
META redirects can be explicitly disabled in IE6.
The above is related to my "Frame This" code (frames-4.htm).


There is no need to make it so complicated though as it is simple.
Make the index.html page the non-JS version and in that page have a
simple script snippet:

<script type="text/javascript">
top.window.location='pageWithJSRequired.html';
</script>

Then, the non-JS gets the non-JS version and the JS people get the JS
version.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 6 '06 #4
JRS: In article <K7******************************@comcast.com>, dated
Wed, 5 Apr 2006 20:26:04 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :

It could also contain a META redirecting to index.htm after one or more
seconds.


META redirects can be explicitly disabled in IE6.


So those who choose to use IE6 and choose to disable META will need to
select the link provided. That's no reason to make everybody else do
it.
The above is related to my "Frame This" code (frames-4.htm).


There is no need to make it so complicated though as it is simple.
Make the index.html page the non-JS version and in that page have a
simple script snippet:

<script type="text/javascript">
top.window.location='pageWithJSRequired.html';
</script>

Then, the non-JS gets the non-JS version and the JS people get the JS
version.


No; both get the non-JS version and those using script also get the
script version. My aim was to minimise the amount of download that the
end users did not end up reading.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Apr 6 '06 #5
Dr John Stockton said the following on 4/6/2006 3:28 PM:
JRS: In article <K7******************************@comcast.com>, dated
Wed, 5 Apr 2006 20:26:04 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
It could also contain a META redirecting to index.htm after one or more
seconds.

META redirects can be explicitly disabled in IE6.


So those who choose to use IE6 and choose to disable META will need to
select the link provided. That's no reason to make everybody else do
it.


You are correct but I still don't see a need/use for a META redirect.
The above is related to my "Frame This" code (frames-4.htm).

There is no need to make it so complicated though as it is simple.
Make the index.html page the non-JS version and in that page have a
simple script snippet:

<script type="text/javascript">
top.window.location='pageWithJSRequired.html';
</script>

Then, the non-JS gets the non-JS version and the JS people get the JS
version.


No; both get the non-JS version and those using script also get the
script version. My aim was to minimise the amount of download that the
end users did not end up reading.


You create the non-JS version. Make it work properly. Then, you enhance
it with scripting and include all your scripting in external files.

The non-JS get a working page.
The JS get a working page.
Nobody downloads more than they need to.

Why mess with a META redirect?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 7 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris | last post by:
I want to detect the version of the JVM that is being used by the browser, for both IE & Firefox (and maybe also Opera & Safari if possilbe). I have searched around the web for such a program,...
12
by: cruiserweight | last post by:
I've constructed this form so that if Javascript is disaabled it will show a typical <input type="submit"> button, BUT using the <noscript> tag. Why is this a problem and what's a viable solution?...
0
by: Paul | last post by:
Hi! I'm writing a small c# program that tries to get the default browser and some settings for that browser ex. Cookie settings and Java settings. Is these Cookie and Java settings stored in...
17
by: Christopher Benson-Manica | last post by:
All right, since my previous idea (calling functions through a wrapper) was apparently so awful no one could suggest any improvements, I'll try a different tack. My end goal is to make detecting...
5
by: David Baker | last post by:
Hi all I am very new to ASP.Net. I am trying to create a sniffer for our program. We want our users to click our sniffer and hopefully the sniffer will check their computer against our...
1
by: Lance | last post by:
Hi, Is there a way to tell if a browser is currently capable of javascript? ie if the user has disabled it or not? I understand that the Request.Browser.JavaScript property will tell if a...
4
by: trpost | last post by:
I am looking for a script using javascript to pull browser information including, browser type and version, OS info, plugins (flash, acrobat, media player, etc), java version, etc. that will work...
16
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript...
2
by: Richard Maher | last post by:
Hi, Recently on the web I came across documentation discussing Data Source Objects (DSO) in relation to browser and html functionality (in particular the ability to declare a Java applet as a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.