javascript - Have a pop up window with checked box list when click on an icon -


i have table in page, data database. in cells have edit icon.i want when users clicks on it, see pop window.

in pop window, want show 3 option(check boxes), user can select 1 of them, , click on ok button, , return value of selected option data variable.(as see in code below)

i have mention, right when user clicks on edit icon, information sent file. because need update database.

   $(".sso").click(function () {     var id = $(this).attr("data-id");     var data= here need value of selected option in pop window   } 

so sso value of class attribute image icon. data-id value helps update correct record in database.

right code in 1 file:

 $(".sso").click(function()   {    var id = $(this).attr("data-id");    // open popup window , pass field id    window.open('sku.php?id=' + encodeuricomponent(id),        'width=400,toolbar=1,resizable=1,scrollbars=yes,height=400,top=100,left=100'); } 

and code in sku.php

  <script type="text/javascript">         function sendvalue (s){           var parentid = <?php echo json_encode($_get['id']); ?>;           window.opener.updatevalue(parentid, s);           window.close();           window.close();         }         </script>          <form name="selectform">         <input type=button value="ok" onclick="sendvalue(document.queryselector('.messagecheckbox:checked').value);"        </form> 

mu form right has ok button, when when click on teh edit button, nothing happens. should not see pop window, ok button inside it?

typically popup windows shown alert() or similar, causes browser make actual popup window. kind of popup window cannot have html elements added it. http://www.codeproject.com/tips/170049/pure-html-css-modal-dialog-box-no-javascript

i used in website , liked them lot, not fan of css :target selector, opened javascript instead, pretty same thing.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -