473,387 Members | 1,611 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,387 software developers and data experts.

how to detect whether javascript is enabled or not on client machine

hi

can any one help me to check that whether javsscript is enabled on
client machine or not. if not enabled then what steps should i take to
run my script that includes javascript.

thanks for your help in advance.....

Jul 17 '05 #1
7 2645
vishal <vi************@yahoo.co.in> wrote:
can any one help me to check that whether javsscript is enabled on
client machine or not.
You can do that with.... javascript...

I'm thinking that a url with a meta/redirect of a couple of seconds and
a javascript redirect with a shorter timeout to different URLs will do
the trick.
if not enabled then what steps should i take to
run my script that includes javascript.


Display a message to the client telling them to turn on javascripa ( or
get a js enabled client), or you could write your scripts in such way
that javascript is optional.

All of this is offcourse OT in a php group since you are doing
clientside stuff.

Jul 17 '05 #2
thxs for information but i could not get what actually you want to say.
so please if you can write in some detail then i will be very thankful
to you.

Jul 17 '05 #3
On your main page write the following:

<meta name="refresh" http-equiv="5;URL=nojavascript.php" />
<script language="javascript" type="text/javascript">
window.location = "javascript.php";
</script>

Jul 17 '05 #4
i have written this code and the page can not be displayed is message
but tell me how web server will know that javascript is not supported
on this client.

Jul 17 '05 #5
vishal <vi************@yahoo.co.in> wrote:
i have written this code and the page can not be displayed is message
Huh?
but tell me how web server will know that javascript is not supported
on this client.


The server doesn't know untill you tell it (like in a session).

See http://tmp.tryba.nl/hasjs/
Jul 17 '05 #6
.oO(Daniel Tryba)
vishal <vi************@yahoo.co.in> wrote:
if not enabled then what steps should i take to
run my script that includes javascript.
Display a message to the client telling them to turn on javascripa ( or
get a js enabled client),


Annoying and not userfriendly.
or you could write your scripts in such way
that javascript is optional.


Much better.

Micha
Jul 17 '05 #7
vishal wrote:
hi

can any one help me to check that whether javsscript is enabled on
client machine or not. if not enabled then what steps should i take to
run my script that includes javascript.

thanks for your help in advance.....

Stateless Client Server environment. Simple answer you can't.
Jul 17 '05 #8

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

Similar topics

9
by: Agoston Bejo | last post by:
Hi, I searched around everywhere on the net, but could not find a simple example of detecting if cookies are enabled - on server side, and without moving from one page to another. This should be...
23
by: David McCulloch | last post by:
QUESTION-1: How can I detect if Norton Internet Security is blocking pop-ups? QUESTION-2a: How could I know if a particular JavaScript function has been declared? QUESTION-2b: How could I...
3
by: Raj | last post by:
Hi All, Is it possible to detect if a client software is installed on a machine using browser javascript. we are building a web/windows software and when the user logs into the web application,...
4
by: mscir | last post by:
Is it possible to detect whether a protocol client-side on any given user's machine? Thanks, Mike
7
by: Privacy Advocate | last post by:
//crossposted to: comp.lang.javascript, alt.comp.lang.javascript in an effort to get factual answers from JavaScript experts// Simply put; Is it possible to obtain the real (actual) IP address of...
1
by: oreng | last post by:
Hey all, I have some problems detecting whether the client's browser javascript is enabled at the server side. While Request.Browser.JavaScript only check if the browser enable java script (and...
2
by: Tee | last post by:
Hi, How can we easily detect cookies is enabled? Thanks
9
by: VK | last post by:
if ((window)&&(window.netscape)&&(window.netscape.security)) { // OK, this is Gecko/Firefox or someone mimicing it so well // that there is no way to catch it on the act. } But I need Firefox...
1
by: balakrishnan.dinesh | last post by:
hi frnds, I need to know how to detect Borwser settings through javascript, I found the code for getting browser language and whether java enabled or not. But i want know the other options like...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.