EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: impperio on October 28, 2012, 05:35:57 PM



Title: pass parameter via $ _POST
Post by: impperio on October 28, 2012, 05:35:57 PM
Gentlemen need help have the value
of the selected row datagrid to call page PDF print.
How poss pass the parameter via $ _POST NOT $_GET
below example of functional code in $ _GET


function print () {
var row = $ ('# dg'). datagrid ('getSelected');
var minha_variavel = [window.open ('impress.php? cCodalu =' + row.codalub)]
};
I appreciate any help in advance


Title: Re: pass parameter via $ _POST
Post by: stworthy on October 29, 2012, 12:48:00 AM
Try opening a temp page instead, like this:
Code:
window.open('temp.php?cCodalu='+row.codalub);
Add a form to the page temp.php, and write some code like this:
Code:
<script type="text/javascript">
window.onload = function () {
  document.forms[0].submit();
}
</script>
<form action="impress.php" method="post">
<input type="hidden" value="<?php echo $_REQUEST['cCodalu']?>">
</form>


Title: Re: pass parameter via $ _POST
Post by: impperio on October 29, 2012, 05:38:03 AM
thanks for your reply, I do not need my correctly

here I call the page print this PDF to print the student bulletin
<a href="#" class="easyui-linkbutton" iconCls="icon-print" plain="true" onclick="print_it()"> Stampa </ a>




print_it function () {
var row = $ ('# dg'). datagrid ('getSelected');
if (row) {
-> Here I need to call the page impress.php where the PDF report

window.open ('impress.php? cCodalu =' + row.codalub);
exit;
}
};

first lines of page impress.php
nivel_necessario $ = 1;
require_once ('conn.php');
require_once ('fpdf.php');

date_default_timezone_set ('Brazil / East');
/ / Echo date ('d / m / Y - h: i');
/ / SEARCH DATABASE

-> $ CCodalu = $ _GET ['cCodalu'];
-> The above line need $ _POST
I thank in advance anyone's opnion sir, thank you very much and sorry for the inconvenience