Mahesh Bodepudi

Mahesh Bodepudi

  • NA
  • 90
  • 56.9k

Web Page Error in javascript function

Nov 3 2016 6:07 AM
Hi,
i am calling the below function from the button click in javascript
 
function print_page() {
alert('print_page');
// var ButtonControl = document.getElementById("btnprint");
// ButtonControl.style.visibility = "hidden";
// window.print();
}
<tr><td> <input type="button" id = "btnPrint" onclick="return print_page();" value="Print" /></td><%--window.print(); onclick="return print_page();"--%> 
 
 I am getting web page error as
Line:10 
'print_page' is undefined.
Pleaase help me how to rectify this 

Answers (6)