English 中文(简体)
现场数据
原标题:popup page php data doesn t show on submit

i 有一个表,即:mysql>>的php变量,表载于。 表格,我试图做的是,向用户展示一个发票风格布局的页码,试图在<代码>上做一个行为。 FORM 提交文件时,一页的滚动页面将显示php 变量数据,即无工作可言,一面试图在一页内显示<代码>连续<<> > 登页/代码>,该页面运行!

The form page Code :

<form action="../../printInvoice.php" method="post" onsubmit="MM_openBrWindow( ../../printInvoice.php , Invoice , status=yes,scrollbars=yes )">
<table width="100%" border="0">
<tr>
    <td align="left">Invoice:</td>
  </tr>
  <tr>
    <td width="12%" height="39" bgcolor="#9DE3FB" align="center">Invoice Number</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Event Name</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Reservation Date</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Quantity</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Price Per Ticket</td>
    <td width="12%" bgcolor="#9DE3FB" align="center">Total Price</td>
  </tr>
  <tr>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceId" readonly="readonly" value="<? echo $row[ invoiceId ]; ?>" class ="field-style"/></td>
    <td width="12%" height="39" align="center"><input type="text" name="eventTitle" readonly="readonly" value="<? echo $row[ name ]; ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceDate" readonly="readonly" value="<? echo $row[ invoiceDate ]; ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceqty" readonly="readonly" value="<? echo $row[ quantity ] ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoicePPU" readonly="readonly" value="<? echo $row[ price ]; ?>" class="field-style" /></td>
    <td width="12%" height="39" align="center"><input type="text" name="invoiceTotal" readonly="readonly" value="<? echo $row[ totalPrice ]; ?>" class="field-style" /></td>
  </tr>
</table>
<br />
<input type="submit" value="Print Invoice" />
</form>

这里是《人口窗口法》(印刷版):

<table width="65%" border="1" cellspacing="5" cellpadding="5">
  <tr>
    <td colspan="5"><table width="100%" border="0" cellspacing="5" cellpadding="5">
      <tr>
        <td width="60%"><img src="images/Logo.png" /></td>
        <td width="40%"><p>Invoice No:# <? echo $invoiceId; ?></p>
          <p>Invoice Date: <? echo $invoiceDate ;?> </p></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="125" colspan="5" valign="top"><p>Bill To:</p>
    <p>Name:</p>
    <p>Address:</p></td>
  </tr>
  <tr>
    <td width="12%" align="center" height="40">Item Id</td>
    <td width="28%" align="center">Item Disc</td>
    <td width="9%" align="center">QTY</td>
    <td width="40%" align="center">Price Per Unit</td>
    <td width="11%" align="center">Total</td>
  </tr>
  <tr>
    <td align="center" valign="middle">1</td>
    <td align="center" valign="middle"><? echo $eventTitle . " ticket(s)"; ?></td>
    <td align="center" valign="middle"><? echo $invoiceqty ; ?></td>
    <td align="center" valign="middle"><? echo $invoicePPU ; ?></td>
    <td align="center" valign="middle"><? echo $invoiceqty * $invoicePPU ; ?></td>
</tr>
 </table>

提交行为,即使用“梦想”行为小组。 这里有什么错误?

最佳回答

我不相信梦想行为,但只要我能够告诉我们,永远不会奏效。

您将数据张贴到“Invoice.php”上,但当你要求登出一页时,你正在打开一个新案例,该案例没有获得员额数据。

你们需要改变一下你script的手法,以便当它履行民生要求时,把表格数据张贴出来。

我不知道你用哪座图书馆来创建你的人为,但还是生机箱。 允许你将数据张贴到数据生成的人群中。

如果你能够告诉我,你使用什么简易图书馆,我或许能够进一步帮助。

问题回答

您必须利用Sphp来展示你必须使用亚x和 j印的人群:

http://jquery.malsup.com/form/

    $(document).ready(function() { 
        // bind  myForm  and provide a simple callback function 
        $( #myForm ).ajaxForm(function() { 
           //show your Popup
        }); 
    }); 

您是否尝试使用<代码>$row[发票Id]; instaed of $invoice Id in the popupwindow?

It seems to be the same file and therfore the $row[] data should be accessable!

如果这只字不行,我们就完全需要更多的代码,特别是要看管点。

^ 忽视一些事情,我们当然需要更多的法典!

感谢而不是所有这些,即把所有变量都列为<代码>url<>/code>参数,例如:

<onsubmit="MM_openBrWindow( ../../printInvoice.php?invoiceId=<? echo $row[ invoiceId ]; ?>&eventTitle=<? echo $row[ name ]; ?> , Invoice 

感谢大家的辛勤努力;时间:





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签