from.. 2011-11-18 23:18 采纳率: 100%
浏览 37

Symfony jQuery Ajax请求

I'm new in symfony , and dont understand the way how to do ajax request . I read symfony chapter18 for ajax and some google result but I can't explain myself this info . I need translate myself how I can do someting like this in symfony

$(".but_addlap").live("click",function(){


                  $.ajax({
                             url: "laps_edit.php",
                             type: "POST",
                             data: "some data,
                             success: function(result1)
                             {

                                      put some  data from result into div 
                             }   

in procedure php I create php file to do some things , get answer and return answer into div . please help me to understand how to do this in Symfony . what I need to write in action, layout and others ..
I hope my english is not to bad to understand my post .

  • 写回答

1条回答 默认 最新

  • weixin_33705053 2011-11-18 23:29
    关注

    The piece of code you're showing us is javascript. It happens client-side, so there is no symfony involved here. The only thing that will probably change is the url, which will be more like this : /index.php/laps/edit

    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 matlab求解平差
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办