This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Java script in struts tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Java script in struts tags" Watch "Java script in struts tags" New topic
Author

Java script in struts tags

Asheesh Nehra
Ranch Hand

Joined: Jun 25, 2009
Posts: 35
Hello

I am trying to call a java script function on change in struts html tags as




but function could not be called. if I call this function in other than struts tags like


, then it works fine what is problem in struts . Thanks
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Asheesh Nehra wrote:

When you see this tag on your browser, just look at the generated HTML code for the same and find out anything that messing up with the JS call.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Santhosh Reddy
Greenhorn

Joined: Sep 25, 2006
Posts: 27
<html:select property="inspection" style="width:150px" onClick="inspection();" >
Asheesh Nehra
Ranch Hand

Joined: Jun 25, 2009
Posts: 35
Thank you all for the reply but struts-html.tld define onclick instead of onClick ???
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

As the previous commenter suggested, check the rendered HTML.
 
Consider Paul's rocket mass heater.
 
subject: Java script in struts tags
 
Similar Threads
Href with onClick
Struts javascript ???
Calling a javascript function after getting ajax response + struts 2.1.6
dojo loading FilteringTable problem
How to call javascript in structslayout:menuItem ?