English 中文(简体)
铁路、酒类中尿液的中继参数
原标题:passing parameters in url invoke in grail, jquery

am a newbie to grails and JQuery as well, I am having this issue with invoking a url, currently its invoked using tag like this:

(美元)

when this link is clicked the URL changes to /myapp/users/userEdit/"value of employeeid". why does the employeeId get appended in the URL like that

在控制器用户 Ed行动的定义如下:

 def userEdit={
            if(params.id!=null && params.id.toString().trim().length()>0){
                log.info("Returning UserInstance whose employee Id: "+params.id)
                def userInstance= Users.findByEmployeeid(params.id.toString().trim());
                if (params.fromdate!=null && params.todate!=null && params.resourceId!=null)  {   
render(view:"actEdit",model:[userInstance:userInstance,fdate:params.fromdate,tdate:params.todate,resId:params.resourceId])   
                  }
                else {render(view:"actEdit",model:[userInstance:userInstance]) }
         } }

基本检查假冒价值,使页数化。

现在,我试图从另一个网页上用jquery.ajax(电话)来援引用户Edit的行动。

function drillchart(empid){
var empid =empid
 jQuery.ajax({
               url:  /myapp/users/userEdit +empid,
                data:{
                fromdate :fromdate,
                 todate :todate,
                 resourceId :res_id
                },
                 dataType:  html ,
                 timeout: 10000,
     beforeSend: function() { jQuery( #userStatisticsDiv ).html(/spinner.gif)},
     success: function(data) { window.location = myurl;}
                              });

问题是最新、最新和资源的数据参数。 因此,在行动过程中,伊德始终在其他方面。

如果我不是直接通过该呼吁的呼号,而是把它当作背心:在电话中,它打算适当传送的那部分数据。

我需要知道,我是如何援引适当的《欧洲权利宪章》并通过该呼吁中的所有参数的。

最佳回答

我对你提出了两项建议:

  1. Check the end slash in the url parameter concatenation.
  2. Don t use sigle colons in you variable names.

因此,必须:

jQuery.ajax({
   url:  /myapp/users/userEdit/ +empid,  //Check if the last slash is needed
   data:   {
             fromdate:fromdate,
             todate:todate,
             resourceId:res_id
           },
   dataType:  html ,
   timeout: 10000,
   beforeSend: function() { jQuery( #userStatisticsDiv ).html(/spinner.gif)},
   success: function(data) { window.location = myurl;}
});
问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签