AnsweredAssumed Answered

Need some help - 'Insert Raw HTML' - 'Submit' button not working.

Question asked by Bunty Alex on Dec 11, 2014
Latest reply on Dec 11, 2014 by wroot

Hello experts,


I have wrote a simple code (HTML+JS) as below.

<!DOCTYPE html>

<p> Entity</p>

<input id="numb">

<button type="button" onclick="myFunction()">Submit</button>

<p id="demo"></p>


function myFunction() {
    var x, text;

    // Get the value of input field with id="numb"
    x = document.getElementById("numb").value;

    if (x == 1234 || x == 5685) {
       text = "Access Key is 'jdjdj3548'";
    }  else if ( x ==  5678 || x ==  8769) {
 text = "Access Key is 'jyjyj5692'";
    }  else {
       text = "Entity";
 document.getElementById("demo").innerHTML = text;


I inserted the code directly into a Blog Post with 'Insert Raw HTML'. When I Publish the blog, 'Submit' button doesn't do anything.


I checked the same code in W3Schools HTML and Submit button works perfectly fine.


Any idea what might be causing the problem?