i have a popup modal dialog on a sharepoint 2013 online site, inside it i want to have a submit button and a checkbox, if user checks it then the submit button is enabled. This code works except that nothing happens to the submit button. The submit button works if its not in the modal dialog.
This html code is inside my modal dialog:
<html>
<body>
<div id="InformationBox" style="display:none;">
<div id="Div2" style="height:100px; padding-top:10px;padding-left:10px;padding-right:10px;">
<label id="lblInformationMessage"> </label>
<br>
<img id="Picture" src=""/></img>
<div id="Div3" style="padding-right:5px;">
<p>i understand</p>
<input type="checkbox" id="checkme" />
<input type="submit" name="sendNewSms" class="inputButton" id="sendNewSms" value=" Send " />
</div>
</div>
</body>
<script>
var checker = document.getElementById('checkme');
var sendbtn = document.getElementById('sendNewSms');
checker.onchange = function(){
if(this.checked == true){
sendbtn.disabled = true;
} else {
sendbtn.disabled = false;
}
}
</script>
</html>
var cloneModalContent = document.createElement('div');
$("#lblInformationMessage").html(newsArray[i].NewsText);
cloneModalContent.innerHTML = document.getElementById('InformationBox').innerHTML;
var options = {
title: newsArray[i].Title,
autoSize: true,
html: cloneModalContent,
dialogReturnValueCallback: myCallback,
allowMaximize: true,
showClose: true,
};