PS: I also added the following shortcode (HTML, CSS and JS) using WP Coder to a reusable block:
<center><h6>WHAT RESONATES</h6></center>
<FORM NAME="WordForm">
<INPUT TYPE=TEXT NAME="WordBox" id="wordbox"><BR>
<INPUT TYPE=BUTTON VALUE="CHOOSE" onClick="PickRandomWord(document.WordForm);" id="button">
</FORM>
body {
font-family: Verdana, Geneva, sans-serif;
font-size: 1.2em;
margin: 0 auto;
max-width: 960px;
padding: 40px 10px;
line-height: 1.65em;
background: #000000;
color: #ffffff;
font-weight: 300;
}
h1 {
text-align: center;
margin: 20% 0 5% 0;
}
#wordbox {
/*opacity: 0;*/
margin: 30px auto 0;
display: block;
width: 300px;
height: 50px;
font-size: 30px;
text-align: center;
background: #000000;
border-radius: 6px;
color: #ffffff;
transition: 1s linear;
}
#button {
background: #ff0000;
border: 0;
color: #ffffff;
font-size: 20px;
padding: 1em 2em;
cursor: pointer;
margin: 0 auto 60px;
display: block;
text-align: center;
border-radius: 100px;
font-weight: bold;
}
var NumberOfWords = 115
var words = new BuildArray(NumberOfWords)
// Use the following variables to
// define your random words:
words[1] = "abused"
words[2] = "accepted"
words[3] = "adored"
words[4] = "affectionate"
words[5] = "afraid"
words[6] = "amused"
words[7] = "angry"
words[8] = "annoyed"
words[9] = "agitated"
words[10] = "anticipation"
words[11] = "anxious"
words[12] = "astonished"
words[13] = "birth"
words[14] = "bliss"
words[15] = "boisterous"
words[16] = "broken"
words[17] = "bold"
words[18] = "cheerful"
words[19] = "calm"
words[20] = "cold"
words[21] = "colourful"
words[22] = "composed"
words[23] = "confident"
words[24] = "confused"
words[25] = "coping"
words[26] = "curious"
words[27] = "dealing"
words[28] = "death"
words[29] = "defeated"
words[30] = "degraded"
words[31] = "delighted"
words[32] = "depressed"
words[33] = "disgusted"
words[34] = "embarrassed"
words[35] = "empty"
words[36] = "energetic"
words[37] = "enthusiastic"
words[38] = "exhausted"
words[39] = "excited"
words[40] = "fine"
words[41] = "frustrated"
words[42] = "fulfilled"
words[43] = "fury"
words[44] = "glad"
words[45] = "gloomy"
words[46] = "goosebumps"
words[47] = "grace"
words[48] = "grasping"
words[49] = "grumpy"
words[50] = "challenged"
words[51] = "happiness"
words[52] = "hate"
words[53] = "heavy"
words[54] = "held"
words[55] = "horror"
words[56] = "humiliated"
words[57] = "hyper"
words[58] = "infatuation"
words[59] = "insecurity"
words[60] = "inspired"
words[61] = "jolly"
words[62] = "joy"
words[63] = "lively"
words[64] = "isolated"
words[65] = "lonely"
words[66] = "longing"
words[67] = "loved"
words[68] = "lust"
words[69] = "mad"
words[70] = "neglected"
words[71] = "noble"
words[72] = "obsessed"
words[73] = "optimistic"
words[74] = "grateful"
words[75] = "overwhelmed"
words[76] = "pessimistic"
words[77] = "pity"
words[78] = "placid"
words[79] = "pleased"
words[80] = "empowered"
words[81] = "disempowered"
words[82] = "pressured"
words[83] = "proud"
words[84] = "questioned"
words[85] = "interrogated"
words[86] = "enraged"
words[87] = "rebirthed"
words[88] = "reflective"
words[89] = "remorse"
words[90] = "revenge"
words[91] = "sad"
words[92] = "satisfied"
words[93] = "sentimental"
words[94] = "serene"
words[95] = "shamed"
words[96] = "sick"
words[97] = "shining"
words[98] = "silly"
words[99] = "stressed"
words[100] = "submissive"
words[101] = "sympathetic"
words[102] = "teary"
words[103] = "tender"
words[104] = "thankful"
words[105] = "thrilled"
words[106] = "tired"
words[107] = "tranquil"
words[108] = "trapped"
words[109] = "triumphant"
words[110] = "witnessed"
words[111] = "worshipped"
words[112] = "worthless"
words[113] = "wrecked"
words[114] = "zealous"
words[115] = "zesty"
function BuildArray(size){
this.length = size
for (var i = 1; i <= size; i++){
this[i] = null}
return this
}
function PickRandomWord(frm) {
// Generate a random number between 1 and NumberOfWords
var rnd = Math.ceil(Math.random() * NumberOfWords)
// Display the word inside the text box
frm.WordBox.value = words[rnd]
}
Could this be the cause of my problem. If so please advise as how to contain/fix as I am not a coder.