This is a discussion on how to detect whether javascript is enabled or not on client machine within the PHP Language forums, part of the PHP Programming Forums category; hi can any one help me to check that whether javsscript is enabled on client machine or not. if not ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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..... |
|
|||
|
vishal <vishal_panjabi@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. |
|
|||
|
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> |
|
|||
|
vishal <vishal_panjabi@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/ |
|
|||
|
.oO(Daniel Tryba)
>vishal <vishal_panjabi@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 |
|
|||
|
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. |