Hello,
I've tried to create a very simple input form to search for a specific word in a string. That said, I'm not having much luck. Firebug is alerting me of an exception error, and I can't figure out why. The code is below. The error msg says it's not a function.
function calculate() {
'use strict';
var output;
var sentence = document.getElementById('sentence');
var keyword = document.getElementById('keyword');
if(sentence && (sentence.value.length > 0)){
if(sentence.search(keyword) != -1){ //error msg here
output = keywo