将Ajax中的PHPvariable传递给Javascript,然后返回PHP

时间:2015-04-02 19:32:53

标签: javascript php ajax

我在ajax中拉出一个数组来创建一个表。我设置了一个变量,如果需要许可证,它会通过Javascript弹出一个弹出窗口。我想将订单ID传递给弹出窗口,以便该人员可以继续工作。变量在Ajax中,我需要一种方法将它一直传递给弹出窗口。

AJAX:

if($row['alert'] == '1') {$stat = 'label-awaitingPermits'; 
                          $nav = '<a href="javascript:;" onClick="openFileUploader();" class="btn btn-danger" data-box="#permit-alert">'.$row['po'].'</a>';}

$ row ['po']是订单ID

JS:

function openFileUploader(){$("#permit-alert").modal('show'); }

HTML:

<p>This job requires more documents in order for the permits to be filed.  Please provide these documents so that we can continue to process your order</p>
                            <p>Continue to Job<?php echo $row['po'];?></p>

0 个答案:

没有答案