Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在php codeigniter中显示弹出窗口_Php - Fatal编程技术网

如何在php codeigniter中显示弹出窗口

如何在php codeigniter中显示弹出窗口,php,Php,这是使用codeigniter框架在php中显示弹出窗口和编辑详细信息的代码。我们编写了相应的显示弹出窗口和编辑单个详细信息的代码,但不起作用。这里我们附加了视图代码。请更正它。 jquery/external/jquery/jquery.js> <div id="addLand" title="Land Details"> <table width="87%" border="1"> <?php

这是使用codeigniter框架在php中显示弹出窗口和编辑详细信息的代码。我们编写了相应的显示弹出窗口和编辑单个详细信息的代码,但不起作用。这里我们附加了视图代码。请更正它。 jquery/external/jquery/jquery.js>

         <div id="addLand" title="Land Details">
        <table width="87%" border="1">
        <?php
            $attr= array('name' => 'frmSave', 'id' => 'frmSave');
            echo form_open('#',$attr);
        ?>
           <input name="txtLandId" type="hidden" id="txtLandId" size="20"/>   
          <tr>
            <td width="57%">Name <span  class="errMsgMark">*</span></td>
            <td width="43%"><label>
              <input name="txt_lname" type="text" id="txt_lname" tabindex="1" size="20" maxlength="50"/>
            </label></td>
          </tr>
         <tr>
            <td>Location<span  class="errMsgMark">*</span></td>
            <td><input name="txt_location" type="text" id="txt_location" tabindex="5" size="20" maxlength="10"/></td>
          </tr>
          <tr>
            <td colspan="2"><div id="ERRmsg1"></div></td>
            </tr>
            <tr>
            <td><input type="button" name="ButSave" value="Save" id="ButSave" class="buttonCSS1"/></td>
            <td><input type="button" name="ButCancel" value="Close" id="ButCancel" class="buttonCSS1" tabindex="9"/></td>
            </tr>
        <?php
            echo form_close();
        ?>
        </table>
        </div>
<table width="100%" border="1" class="mGrid">
          <tr>
            <th width="6%"><div align="center">Sl.No</div></th>
            <th width="22%"><div align="center">Name</div></th>
            <th width="23%"><div align="center">Location</div></th>
            <th colspan="3"><input type="button" name="ButNew" value="New" id="ButNew" class="buttonCSS1"/></th>
            </tr>
            <tr>
    <?php
                $str1='';
                $y=0;
                $i=0;
                //$LandM_Details=array();
                //print_r($LandM_Details);
                foreach($LandM_Details->result() as $row)
                {
                    $y=$i+1;  
                    $str1.= '<tr><td width="5%" height="23" >'.$y.'</td>';
                    $str1.= '<td width="25%" height="23">'.$row->land_name.'</td>';
                    $str1.= '<td width="15%" height="23" >'.$row->land_location.'</td>';
                    $str1.= '<td align=center><a href=# onclick=EditDetails('.$row->id.');>Edit</a></td>';
                    $i++;
                }
                echo $str1;
    ?>
    </tr>
    </table>
    <script language="javascript" type="text/javascript">
        $(function(){

            $('#addLand').dialog({
                autoOpen: false,
                modal: true,
                resizable:false,
                width:'370px'
            });
$('#ButNew').click(function(){
                            //document.getElementByName('txt_lname').value='';
                            //document.getElementByName('txt_id').value=0;
                            //$('#txt_lname').val('');
                            //$('#txt_location').val('');
                            $('#addLand').dialog('open');
            });

        $('#ButSave').click(function(){           //Save land details........
                    var values = $("#frmSave").serialize();
                    alert(values);
                            $.ajax({
                               type: "POST",
                               url: "<?php echo base_url();?>index.php/home/get_land_details",
                               data: values,
                               dataType: "json",
                               success: function(msg){
                                alert(msg.success);
                                    if(msg.success=="1")
                                    {
                                        $('#ERRmsg1').html(msg.val);
                                        $("#addLand").dialog('close');
                                    }
                                    else
                                    {
                                         $("#ERRmsg1").html(msg.val);
                                    }
                                },
                               error: function(jqXHR, textStatus, errorThrown) 
                               { 
                                     alert( jqXHR.responseText);
                               }
                            });

              });
              function EditDetails(v1)     //Edit Land details...........
                {       
                            document.getElementById('txtLandId').value=v1;
                            //document.getElementById('txt_location').value=v2;
                                var values = $("#frmSave").serialize();
                                alert(values);
                                $.ajax({
                                       type: "POST",
                                       url: "<?php echo base_url();?>index.php/home/get_land_details",
                                       data: values,
                                       dataType: "json",
                                       success: function(msg){
                                       alert(msg.success);
                                            $('#txt_lname').val(msg.land_name);
                                            $('#txt_location').val(msg.land_location);
                                            //$('#addLand').dialog('open');                         
                                        },
                                       error: function(jqXHR, textStatus, errorThrown) 
                                        { 
                                             alert( jqXHR.responseText);
                                        }
                                    });

                            }
    });
    </script>         here

您面临的问题是什么?我的意思是任何错误?您是否在firebug或开发人员工具窗口上看到任何错误消息?无法显示弹出窗口,编辑按钮不起作用