I am trying to write a custom link on a datagram. The user has 'edit', 'add' and 'normal' functions. 'Delete' but I'm also adding 'View' to all my code works differently from the visual function, but how can I open the selected row in the custom URL? This can not work. What I want to achieve, the user selects a line and then clicks on the View button which then transfers the ID to the Report URL.
That's my code that works; -
function editing order () {var row = $ ('# dg'). DataGrid ('getSelected'); If (line) {$ ('# dlg'). Dialog ('Open'). Dialog ('set', 'edit order'); $ ('#fm') form ('load', line) Url = '/include/functions/edit/edit_order.php?id='+row.id;
And here is the code I have tried, but I can not do the job; -
function viewOrder () {var row = $ ('#dg') datagrid (. 'GetSelected'); If (line) {$ ('# FM'). Form ('load', line); Url = '/include/functions/reports/purchase_order.php?id='5row.id;
Any help is appreciated
Function Vieworder () {Var Line = $ ('# DG'). DataGrid ('getSelected'); If (line) {url = "/include/functions/reports/purchase_order.php?id=" + row.id; Window.open (url); }
No comments:
Post a Comment