0

Hi i have an issue with javascript print funcanality. I have two dropdown. One for city and another for state. I am accessing data of each city of state using ajax. This is working fine. In last I want the print of accessed data. when I click on print button and later if I cancel the print process or if I complete the whole process of print then in last it reset the dropdown. I lost my selected entry from state and city dropdown.

<script>
  function printDiv(divName) {
    var printContents = document.getElementById(divName).innerHTML; 
    var originalContents = document.body.innerHTML; 
     document.body.innerHTML = printContents; window.print(); 
  document.body.innerHTML = originalContents; 
//window.location='smartcity-performance.php?action='+dataVal; 
   //window.location.reload(); 
 } </script>
Ahmed Sunny
  • 2,160
  • 1
  • 21
  • 27

0 Answers0