开发者

reading Struts2 tag values in javascript

I am using struts2 with jsp. In Jsp, i have a table in which few rows of data are present. I have used iterators to display row data of table. Each row contains a button to update the row data(like priority of row data). I am trying to use javascript to update row data when a button is clicked. I am not able to access the value of butt开发者_JS百科on. I am not able to find which button is clicked (since one button is present for eahc row of data). I tried using below script. not working. :(

function show_alert() { var partnumber = document.getElementById("stop").Value; alert(partnumber); } Also, please let me know if it is possible to access values of struts2 tag values (which are with in iterator tag).

Please help me out.

Thanks in advance. regards, hemanth.


You'll need make the buttons have unique ids. You can use the iterator's status object to appending the index to the id.

http://struts.apache.org/2.1.6/docs/iterator.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜