开发者

pass the value of "Rate<%=Cnt%>" to be updated in updateRate function

开发者 https://www.devze.com 2023-01-20 22:26 出处:网络
<table width=100%> <tr> <td id=\"show1\" class=\"centerNoBorder\">&nbsp;<input type=\"button\" name=\"upd_rate\" value=\"Update Rate\" onclick=\"showEdit(1)\"></td>
 <table width=100%>
  <tr>

   <td id="show1" class="centerNoBorder">&nbsp;<input type="button" name="upd_rate" value="Update Rate" onclick="showEdit(1)"></td>

   <td id="show2" style="display:none" class="centerNoBorder">&nbsp;<input type="button" name="upd_rate" value="Save" onclick=" updateRate(); showEdit(2)"></td>

<%=cDouble%> <%=rscDesc%> " name="rscUm<%=Cnt%>"><%=rscUm%> " name="rscQty<%=Cnt%>"><%=rscQty%> <%if (rscDesc != null); {Cnt++; }

     System.out.println("Cnt_rscCnt" + rscCnt);%>
        <td class="leftAlign" valign=top id="rscRate"><div name="aEdit<%=Cnt%>" id="divRate<%=Cnt%>"><%=rscRate%></div><input type="text" id="Rate<%=Cnt%>" name="aEdit<%=C开发者_JAVA百科nt%>" value="<%=rscRate %>" style="display:none"></td>
        <td class="leftAlign" valign=top id="rscCost"><div name="bEdit<%=Cnt%>" id="divAmt<%=Cnt%>"><%=calAmt%></div><input type="text"  id="Amt<%=Cnt%>" name="bEdit<%=Cnt%>" value="<%=calAmt %>" style="display:none"></td>
       </tr>

function updateRate() { alert ("updateRate"+ document.getElementById('flag').value); for (var n=1; n<18; n++){ var aEdit=document.getElementById('aEdit'+n).value; var bEdit=document.getElementById('bEdit'+n).value; alert("HERE: " + document.getElementById('aEdit'+n).value); }

public void uRate(int n) throws Exception {

System.out.println("b: "+n); String sqlUpdate=""; MultiDBManager db7=new MultiDBManager(uif); sqlUpdate="update pklrsc set pr_prod_rate='showEdit"+n+"' and pr_ln_cst='showEditCost"+n+"' where pr_rsc_cde='rscDesc'"; //"UPDATE pklrsc SET pr_prod_rate='Rate"+n+"' , pr_ln_cst='Amt"+n+"' WHERE pr_rsc_um= 'rscUm'" System.out.println("uRate"); n++; db7.execUpdate(sqlUpdate); }


*re check sqlUpdate writing. you've got parsing error...

also- consider using concat instead of '+'*

concat('text1 with "some text2"', "text 3 and text 4", a_vartible, '">', a_name);
0

精彩评论

暂无评论...
验证码 换一张
取 消