Title: Conditional check for Javascript?
Last modified: August 19, 2016

---

# Conditional check for Javascript?

 *  Resolved [tictok](https://wordpress.org/support/users/tictok/)
 * (@tictok)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/conditional-check-for-javascript/)
 * Does anyone know of anyway within coding a template that I could check to see
   if a visitors browser has javascript enabled or not and then run a conditional
   statement based on this?
 * There are a few areas of a site I’m building (using WP as a CMS) which rely on
   javascript and would appear broken or incorrect with JS disabled in the browser.
 * I want to find a way to offer visitors without JS a couple of alternative pages
   that will look and work okay without JS.
 * So, in a nutshell, I guess I’m asking wether;
    **A)** Is it possible to check
   to see if a visitors browser has JS enabled? if so; **B)** Use the outcome of
   the JS check to conditionally show one page or another (i.e. if user has JS enabled
   get template-file-A.php else if user does not have JS get template-file-B.php)
 * hope someone can help!
    Many thanks Stef

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [coopersita](https://wordpress.org/support/users/coopersita/)
 * (@coopersita)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/conditional-check-for-javascript/#post-1562098)
 * I posted a possible solution in your old thread: [http://wordpress.org/support/topic/417120](http://wordpress.org/support/topic/417120)
 *  Thread Starter [tictok](https://wordpress.org/support/users/tictok/)
 * (@tictok)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/conditional-check-for-javascript/#post-1562110)
 * Thanks –
 * yep if you’re following this thread go here:-
 * [http://wordpress.org/support/topic/417120](http://wordpress.org/support/topic/417120)
 * cheers
    S

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Conditional check for Javascript?’ is closed to new replies.

## Tags

 * [check](https://wordpress.org/support/topic-tag/check/)
 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [java](https://wordpress.org/support/topic-tag/java/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [tictok](https://wordpress.org/support/users/tictok/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/conditional-check-for-javascript/#post-1562110)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
