简体   繁体   English

从php程序的弹出窗口中调用另一个php程序

[英]Calling another php program in a popup window from a php program

I am trying to call another php program in a pop up window within a php program. 我试图在一个php程序的弹出窗口中调用另一个php程序。

I want to click on the word allowance and bring up a window with the allowance details. 我想单击“津贴”一词,并打开一个包含津贴详细信息的窗口。 The lookallow program is working great but need to call it from a click on the word allowance. lookallow程序运行良好,但是需要通过单击单词allowance来调用它。

This code works and opens another window and closes the first. 该代码可以工作并打开另一个窗口,然后关闭第一个窗口。 I want a pop up window to overlay the current window. 我想要一个弹出窗口来覆盖当前窗口。

echo "<td> <a href='lookallow.php?ordr=$ORDER &bord=$BORD'> Allowance </a> </td>";

I tried this to get the popup windso but keep getting syntax errors when trying to do the popup window. 我试图这样做以获取弹出窗口,但在尝试执行弹出窗口时却不断收到语法错误。 Could someone please show me the correct syntax to do the pop up window? 有人可以告诉我正确的语法来执行弹出窗口吗?

echo "<td> <a href='#' onclick='window.open("lookallow.php?ordr=$ORDER &bord=$BORD","","width=200,height=100");'>Allowance</td>";

Much Thanks for your help! 非常感谢您的帮助!

You have errors on your syntax (check the quotes): 您的语法有误(请检查引号):

echo "<td> <a href='#' onclick='window.open("lookallow.php?ordr=$ORDER &bord=$BORD","","width=200,height=100");'>Allowance</td>";

Correct way: 正确方法:

echo "<td> <a href='#' onclick='window.open('lookallow.php?ordr=$ORDER &bord=$BORD','','width=200,height=100');'>Allowance</td>";

;) ;)

您在代码中关闭“”。而是尝试如下操作:

<td> <a href='#' onclick='window.open(<?php echo "lookallow.php?ordr=$ORDER&bord=$BORD"; ?>,"","width=200,height=100");'>Allowance</td>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM