File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass runtime variables to Javascript function on onclick event form struts html:button tag ?

 
pratibha patel
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

My Problem is I am not able to call my Javascript function on onclick event of button from struts html:button tag. I am iterating some values from bean and passing those values to Javascript function "MyFunction". How to do that ? I am using struts tag <html:button > instead of pure HTML tag <input type = button>

Below code not working for struts tag for button


If I use pure HTML tag for button then it is working fine->


Please help me on this.
Thanks.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the HTML that works for you, and the HTML that is generated by Struts.
 
Karthik Jayachandran
Ranch Hand
Posts: 91
Android AngularJS Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

JSTL expressions may work with struts tags,

try using like,
 
pratibha patel
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Karthi,

Thanks for your reply, but my problem has no yet resolved. Find below explanation.

I have tried above code, it calls javascript function"myFunction" but takes value as it is. When I try to get values, for example->

it gives value "${no_list}". Here I want the actual value of no_list.

 
Karthik Jayachandran
Ranch Hand
Posts: 91
Android AngularJS Ubuntu
 
Saurabh Gupta
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pratibha,

Did you got any soluition for the below mentioned problem?
I am also facing similar issue and looking for some help.

Thanks Saurabh
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic