wood burning stoves 2.0*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java script in struts tags
 
Similar Threads
Struts javascript ???
How to call javascript in structslayout:menuItem ?
Calling a javascript function after getting ajax response + struts 2.1.6
Href with onClick
dojo loading FilteringTable problem