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

如何在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")'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。