hyperlink - Adding Link to Cell in Jquery Easy UI -
i want add together print button in next datagrid table using formatter.
datagrid:
<thead> <tr> <th field="id" align="center" sortable="true" >id</th> <th field="name" sortable="true">name</th> <th field="department" align="center" sortable="true">department</th> <th field="phone" align="center" sortable="true">phone no</th> <th data-options="field:'id', formatter:quickprint">print</th> </thead>
the formatter function:
function quickprint(val,row){ var url = "print.php?id="; homecoming '<a href="'+url + row.id+'">print</a>'; }
print.php
<?php $id=htmlspecialchars($_get['id']); //my other codes go here ?>
i want send id value in print.php
file , id value using $_get
. problem id
values displayed , don't have clickable link. help , suggestions welcome. in advance.
first remove first id row in datagrid below:
<thead> <tr> <th field="name" align="left">name</th> <th field="department" align="left" sortable="true">department</th> <th field="phone" align="right" sortable="true">phone no</th> <th field="id" align="center" formatter="quickprint">print</th> </thead>
your function should go this:
<script> function quickprint(value,row){ var url = 'print.php?id='+row.id; homecoming '<a target="_blank" href="' + url + '"><button>print</button></a>'; } </script>
hope may help.
jquery hyperlink jquery-easyui
No comments:
Post a Comment