I was wondering if anyone can point me in the right direction...I'm new to web development and an having issues with the javascript function run in a new window, instead of the same window/tab that I'm in. I would like it to print out in an element on the page... this is what I have so far...please let me know if more is needed...
html:
<div id="today">
<script type="text/javascript" src="today.js"></script>
<p>
Display todays date and current time here <i>(list of appointments below)</i>
</p>
<input id="chbx" type="checkbox" name="edit" value="edit" onchange="dayApptList()">I wish to edit
</div>
javascript:
time = 0
function waste(){
while (time++ < 8)
document.write(time + " multiplied by 8 equals " + time * 8 + '<br>')
}
function dayApptList(){
var checkbox = document.getElementById("chbx");
// display list of contacts
if(checkbox.checked){
waste();
};
};
thanks for your time and advice