search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

1 answers
Q&A The elastic layer+$.post cannot obtain the data. Please help me!

0


//View code

<a href="javascript:;" title="Modify" onclick="update_column({$vo.column_id})" ><span class="glyphicon glyphicon-pencil"></span></a>


//js with code//modify column

function update_column(id){
$.post("{:url('admin/update_column')}",{id:id});
layer.open({
type: 2 //Page Layer type
,area: ['500px', '220px']
,title: 'User added'
,shade: 0.6 //Mask transparency
,maxmin: true //Allow full screen Minimize
,anim: 1 //0-6 animation form, -1 does not open
,content: 'update_column.html'
});
}

/ /Controller with code

public function update_column(Request $request){
$date=$request->param('id');
$list=Book_column:: get($date);
$this->view->assign('list',$list);
return $this->view->fetch();
}


//Pop-up window

<div class="panel panel-default">
<div class="panel-body">
&lt ;form class="form-horizontal" role="form">
;div class="form-group">
; <label for="firstname" class="col-sm-2 control-label">Column name</label>
  <div class="col-sm-10">
  <input type="text" class="form-control" name= "column_name" id="firstname"
     placeholder="{$list.column_name}">
   </div>
  </div>
  <input type="hidden" name="column_id" value="{$list.column_id}">
  <div class="form-group">
  <div class="col-sm-offset-2 col- sm-10">
; <button type="button" id="update" class="btn btn-default">Modify column</button>
; </div>
</div>
</form>
</div>
</div>

Your Answer
submit

1 answers
1

$.post("{:url('admin/update_column')}",{id:id});

$.post({

          url: "url( 'admin/update_column')",

data:{id:id},

success:function(data){

console.log (data);

##                                                                                                                  , title: 'User added'

,shade: 0.6 //Mask transparency
,maxmin: true //Allow full screen minimization
,anim: 1 //0- 6 animation mode, -1 is not enabled
              , content: 'update_column.html'
                                                                                                                                                                                       Download the api of jquery-ajax

Understand the f12 of chorme and debug

2017-10-27 11:04:49

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use