function showitem(oid,orderno){<br>var url = ‘http://localhost:808/luckyproject/sales/produceorderaction.do’;<br>var pars = ‘action=action_showitem’;<br>pars = pars + “&orderno=”+orderno;<br>var myajax = new ajax.request(<br>url,<br>{<br>method: ‘get’,<br>parameters: pars,<br>oncomplete: showresponse<br>});<br>}
function showresponse(originalrequest){<br>alert(”111″);<br>}<br>上面的方法运行正常(使用prototype.js开发包),但是现在想把oid,orderno传递到回调函数showresponse里面,<br>showresponse(originalrequest,oid,orderno)运行没办法通过,请大家教教!
<h5>采纳的答案</h5>不知道这样可以嘛,没用过prototype
<h5>其他回答</h5>oncomplete: function(originalrequest)<br>{<br> showresponse(originalrequest, oid,orderno);<br>}
==============
function showresponse(originalrequest, oid,orderno)<br>{ <br> alert(oid + ‘ ‘ + orderno ); <br>}
我也用prototype, 这样没有任何问题。 如果还有问题 发站内信息给我 一起讨论一起解决。
楼上正解,或者直接把 showresponse函数 放在 showitem函数内部,这样showresponse可以直接使用oid变量,而且不需要传参数。
function showresponse(originalrequest){<br>alert(”111″);<br>}<br>上面的方法运行正常(使用prototype.js开发包),但是现在想把oid,orderno传递到回调函数showresponse里面,<br>showresponse(originalrequest,oid,orderno)运行没办法通过,请大家教教!
<h5>采纳的答案</h5>不知道这样可以嘛,没用过prototype
oncomplete:function(oid,orderno){showresponse(originalrequest,oid,orderno);}
[b]提问者对于答案的评价:[/b]<br>问题最快解决的!<br>[b]额外加分:15[/b]<h5>其他回答</h5>oncomplete: function(originalrequest)<br>{<br> showresponse(originalrequest, oid,orderno);<br>}
==============
function showresponse(originalrequest, oid,orderno)<br>{ <br> alert(oid + ‘ ‘ + orderno ); <br>}
我也用prototype, 这样没有任何问题。 如果还有问题 发站内信息给我 一起讨论一起解决。
楼上正解,或者直接把 showresponse函数 放在 showitem函数内部,这样showresponse可以直接使用oid变量,而且不需要传参数。