dongshan7060 2014-04-01 08:57
浏览 216
已采纳

如何在jQuery中使用jQgrid的editUrl属性

I have been trying to implement edit/add of rows in jqgrid dynamically but stuck at place with editUrl attribute. Can somebody tell me that

1) Where to keep this php file, in server or in our applcation?

2) I am using like editurl: './data_save.php', and I have this file in my application, next to my jsp file. But on submit, I am getting 'error Status: 'Not Found'. Error code: 404' on top of popup window and on console I am getting, no mapping found for request with URI [/myapp/some.php] in distacherservlet with name 'myApp'.

Any idea?

Update :- I also tried using, editurl:'/some.jsp' and when I create on controller(expecting this url) in my Spring MVC Controller class then I do not get message at console saying, "no mapping found for request with URI [/myapp/some.php] in distacherservlet with name 'myApp'"

  • 写回答

1条回答 默认 最新

  • doudao7113 2014-04-04 11:03
    关注

    Use your application name

    editUrl:'WhatEverYourApplicationNameIs/data_save.php'
    

    Update1:

    editUrl:'@Url.Action("ActionName","ControllerName")'
    

    Update2:

    If your edit method is like below

    public .. MyEditMethod()
    {
    //Add logic
    }
    

    then your editUrl will be

    editUrl:'@Url.Action("MyEditMethod","WhatEverYourControllecNameIs")'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀