javascript - How Do Set open popup And get Chacked value in another page -


  1. (1) select book(onchange value) open popup ok.

  2. (2)open popup in checked netamount want total in text box.

  3. (3)then cheked netamount display record in index page.

    i want point(2,3).

enter image description here index.php

script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript"> $(function () { $("#debit_id").change(function () {  var debit_id = document.getelementbyid('debit_id').value; if(debit_id!="") { window.open("getpopup.php?debit_id="+debit_id,'popup','width=700,height=400,left=200,top=200,scrollbars=1'); } }); }); </script>   book : <select name="debit_id" id="debit_id"> <option value="" selected="selected">select book</option> <?php  $result1 = mysql_query("select accountname,cid account")or die(mysql_error());          while($row1 = mysql_fetch_array($result1)) if($row1) { ?> <option value="<?php echo $row1['cid']; ?>"><?php echo  $row1['accountname']; ?></option><?php  } ?> </select> <br /> netamount total : <input type="text" class="input" name="netamount" id="totalcost"> 

popup.php

<?php include("../config.php"); $debit_id = intval($_get['debit_id']); ?> <table> <tr> <th>srno</th> <th>entrydate</th> <th>netamount</th> </tr> <?php  $sql="select * transaction credit_id = '".$debit_id."'"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { $srno =$row['srno']; $entrydate = $row['entrydate']; $netamount =$row['netamount']; ?> <tr> <td><?php echo $srno ?></td> <td><?php echo $entrydate ?></td> <td><?php echo $netamount ?><input type="checkbox"  name="<?php echo $srno ?>" value="<?php echo $netamount ?>"></td> </tr>  <?php }?> <tr> <td colspan="3" align="center"> <input type="submit" value="ok" /> </td> </tr> </table> 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -