Title: Javascript running strangely
Last modified: August 21, 2016

---

# Javascript running strangely

 *  [talon77](https://wordpress.org/support/users/talon77/)
 * (@talon77)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/javascript-running-strangely/)
 * Javascript seems to be running very strangely on my wordpress account. I say 
   this because I have opened the html file from my desktop with no problem and 
   although the sc function does not work the checkboxes at least check and unchek
   properly. But for some reason in wordpress nothing works. Is there something 
   that I am supposed to import? How do I do that?
 *     ```
       <script>
   
       function check()
         {
         document.getElementById("check1").checked=true
         }
       function uncheck()
         {
         document.getElementById("check1").checked=false
         }
       function sc()
         {
   
         if(document.getElementById("check1").checked)
           {
           document.getElementById("check2").style.display="none"
           }
         }
       </script>
   
       <body>
   
       <form>
       <input type="checkbox" id="check1">Print Design
       <input type="checkbox" id="check2">Print Design
       </form>
   
       <button onclick="check()">Check Checkbox</button>
       <button onclick="uncheck()">Uncheck Checkbox</button>
       <button onclick="sc()">Next</button>
   
       </body>
       ```
   

Viewing 1 replies (of 1 total)

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/javascript-running-strangely/#post-4047063)
 * Please see:
 * [http://codex.wordpress.org/Using_Javascript](http://codex.wordpress.org/Using_Javascript)
 * and
 * [http://codex.wordpress.org/Forum_Welcome#No_Bumping](http://codex.wordpress.org/Forum_Welcome#No_Bumping)

Viewing 1 replies (of 1 total)

The topic ‘Javascript running strangely’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/javascript-running-strangely/#post-4047063)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
