{"action":"created","issue":{"url":"https://api.github.com/repos/wbraganca/yii2-dynamicform/issues/107","labels_url":"https://api.github.com/repos/wbraganca/yii2-dynamicform/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/wbraganca/yii2-dynamicform/issues/107/comments","events_url":"https://api.github.com/repos/wbraganca/yii2-dynamicform/issues/107/events","html_url":"https://github.com/wbraganca/yii2-dynamicform/issues/107","id":117850754,"number":107,"title":"Call javascript function on remove item button.","user":{"login":"vishwasrao","id":322956,"avatar_url":"https://avatars.githubusercontent.com/u/322956?v=3","gravatar_id":"","url":"https://api.github.com/users/vishwasrao","html_url":"https://github.com/vishwasrao","followers_url":"https://api.github.com/users/vishwasrao/followers","following_url":"https://api.github.com/users/vishwasrao/following{/other_user}","gists_url":"https://api.github.com/users/vishwasrao/gists{/gist_id}","starred_url":"https://api.github.com/users/vishwasrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishwasrao/subscriptions","organizations_url":"https://api.github.com/users/vishwasrao/orgs","repos_url":"https://api.github.com/users/vishwasrao/repos","events_url":"https://api.github.com/users/vishwasrao/events{/privacy}","received_events_url":"https://api.github.com/users/vishwasrao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-19T16:26:30Z","updated_at":"2015-11-28T12:51:20Z","closed_at":null,"body":"Hi All,\r\nI have implemented dynamic form in my application.\r\nThere are two models invoice & invoiceitem used in it.\r\nI can add/remove invoiceitems dynamically .\r\ninvoiceitem has fields like rate,quantity,\r\nI have written javascript function to calulcate price when we change rate , quantity & populate total price .\r\nThis is working fine when we add multiple invoiceitems.\r\nBut when we remove invoiceitem ,that function should get fired to calculate total again.\r\n\r\nI tried below but its not working\r\n\r\n```\r\n<button type=\"button\" id=\"removeitem\" class=\"remove-item btn btn-danger btn-xs\"><i class=\"glyphicon glyphicon-minus\"></i></button>\r\n```\r\n& then call to javascript function\r\n```\r\n<script>\r\ndocument.getElementById(\"deleteButton\").onclick =function() {\r\n   // alert(\"Hello\");\r\n    netprice()};\r\n.....\r\n```\r\nAnybody has idea how can i fire JS function on this remove button.\r\n\r\n\r\nThanks in advance,\r\nVishwas\r\n\r\nAlso if someone wants to know this functionality ,let me know I would like to share all working functionality here with you all or may be will create wiki page for same."},"comment":{"url":"https://api.github.com/repos/wbraganca/yii2-dynamicform/issues/comments/160291895","html_url":"https://github.com/wbraganca/yii2-dynamicform/issues/107#issuecomment-160291895","issue_url":"https://api.github.com/repos/wbraganca/yii2-dynamicform/issues/107","id":160291895,"user":{"login":"vishwasrao","id":322956,"avatar_url":"https://avatars.githubusercontent.com/u/322956?v=3","gravatar_id":"","url":"https://api.github.com/users/vishwasrao","html_url":"https://github.com/vishwasrao","followers_url":"https://api.github.com/users/vishwasrao/followers","following_url":"https://api.github.com/users/vishwasrao/following{/other_user}","gists_url":"https://api.github.com/users/vishwasrao/gists{/gist_id}","starred_url":"https://api.github.com/users/vishwasrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishwasrao/subscriptions","organizations_url":"https://api.github.com/users/vishwasrao/orgs","repos_url":"https://api.github.com/users/vishwasrao/repos","events_url":"https://api.github.com/users/vishwasrao/events{/privacy}","received_events_url":"https://api.github.com/users/vishwasrao/received_events","type":"User","site_admin":false},"created_at":"2015-11-28T12:51:20Z","updated_at":"2015-11-28T12:51:20Z","body":"Hi,\r\nI tried this but still its not working.\r\nThanks,\r\nVishwas"}}