EasyUI Forum
November 05, 2025, 12:50:52 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Poll
Question: pass parameter via $ _POST
pass parameter via $ _POST - 0 (0%)
pass parameter via $ _POST - 0 (0%)
Total Voters: 0

Pages: [1]
  Print  
Author Topic: pass parameter via $ _POST  (Read 13451 times)
impperio
Newbie
*
Posts: 11


View Profile Email
« 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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>
Logged
impperio
Newbie
*
Posts: 11


View Profile Email
« Reply #2 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
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!