?
Solved

Checking for Javascript using VBScript

Posted on 2005-04-07
10
Medium Priority
?
389 Views
Last Modified: 2010-04-06
I would like to know if there is a way to check if a user's browser has Javascript enabled. I however can't do this using Javascript, for obvious reasons. The only other alternative is by using client-side ASP.NET, which is browser dependant (at this stage), or by using VBScript, which is also browser dependant, but more widely implimented. Any alternatives for detecting this client-side, browser setting would also be welcome.

Thanx
C
0
Comment
Question by:craigofcapetown
  • 4
  • 3
8 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 1500 total points
ID: 13725051
you could check if javascript is enabled using the noscript tags, if it is diabled it will redirect you to google( ur alternative page  ) else you could continue processing.no need for vbscript...
<html>
<head>
         <noscript>
              <meta http-equiv="Refresh" content="0; URL=http://www.google.com">
          </noscript>
</head>
     <body>
         
     </body>
</html>
0
 
LVL 2

Author Comment

by:craigofcapetown
ID: 13725191
would it still execute the code between the noscript tags-even if javascript is enabled?
Does this mean that server-side ASP, when placed after the noscript tags setting the headers to redirect to the page containing javascript would fail to execute as result of the redirect between the noscript tags?
Are noscript tags widely supported?
0
 
LVL 33

Expert Comment

by:sajuks
ID: 13725248
": would it still execute the code between the noscript tags-even if javascript is enabled?"
no thats the purpose of the <noscript> tags.
if javascript is enabled then it will ignore the script between the <noscript> tag and instead execute whats between
<script> tag,

"Does this mean that server-side ASP, when placed after the noscript tags setting the headers to redirect to the page containing javascript would fail to execute as result of the redirect between the noscript tags?"
yes


"Are noscript tags widely supported?"
works in ie6,mozilla
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:craigofcapetown
ID: 13725671
nn7? opera? ie3? lynx? x browser?
0
 
LVL 33

Expert Comment

by:sajuks
ID: 13725720
would also work in  nn7  & opera  
dont've the rest of the browsers so cant test..
0
 
LVL 2

Author Comment

by:craigofcapetown
ID: 13725934
do i then add the code as follows :

<head>

    <script language="Javascript">

        Alert('hello!');

        <noscript>

           ...

        </noscript>

    </script>

</head>

or

<head>

    <script language="Javascript">

        Alert('hello!');

    </script>

    <noscript>

       ...

    </noscript>

</head>

?
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13730459
FYI:
<noscript> has been support by every browser since IE 3 and Netscrap 3.  


Cd&
0
 
LVL 33

Expert Comment

by:sajuks
ID: 13734368
Why a 'C' ?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question