doubu1853 2013-08-30 05:23
浏览 11

PHP网格/表模态弹出复制

I am using PHP to create a grid/table for user entry and all works fine. The problem is that one of the text boxes has a modal popup with some additional information. It works fine if there is only 1 row, but when I add 2 or more, the Modal options are then posted above the table and the popup does not work. Any ideas?

Javascript/Jquery

$(function () {

    $("#MyDialog").dialog({
        autoOpen: false,
        height: 300,
        width: 340,
        modal: true,
        buttons: {
            "Save": function () {
                $('#popup').val($('#year').val() + " " + $('#week').val() + " " + $('#day').val());
                $(this).dialog("close");
            },
            "Cancel": function () {
                $(this).dialog("close");
            }
        },
        close: function () {
            $('#year').val("");
            $('#week').val("");
            $('#day').val("");
        }
    });

    $("#popup").click(function () {
        $("#MyDialog").dialog("open");
    });
});

PHP

$line = $_GET["Line"];  
if($line == 0){$line=1;}  
for($i=1;$i<=$line;$i++)
{

Code

<tr>
<td><div align="center"><input type="text" id="type" title="X1" name="txttypeofunit<?=$i;?>" size="12"></div></td>
<td><input type="text" id="description" title="X2" name="txtunitdescription<?=$i;?>" size="15"></td>
<td><input type="text" id="manu" title="X3" name="txtmanufacturer<?=$i;?>" size="12"></td>
<td><div align="center"><input type="text" id="model" title="X4<?=$i;?>" size="12"></div> </td>
<td align="right"><input type="text" id="serial" title="X4" name="txtserial<?=$i;?>" size="12"></td>
<td align="right"><input type="text" id="tags" title="X5" name="txtyearbuilt<?=$i;?>" size="12"></td>
<div id="MyDialog" title="Running Time Of Unit <?=$i;?>" >
      Months a year?   <input type="text" id="year" size="5" /> - M/Y <br>
        Days a week?   <input type="text" id="week" size="5" /> - D/W <br>
        Hours a day?   <input type="text" id="day" size="5" /> - H/D            
    </div>
    <div>
<td align="right"><input type="text" id="popup" id="cool" title="How many months in a year is the unit in use? 1 - 12" size="12">    
</div>
<td><input type="text" id="refig" title="X6" name="txtrefrigerationtype<?=$i;?>" size="12"></td>
<td><div align="center"><input type="number" id="input" title="X7" 

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 python变量和列表之间的相互影响
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)