STRUTS html-el:select tag event

Posted on 2007-08-09
Last Modified: 2013-11-24
In the STRUTS html-el:select tag, are you able to add an onchange or onclick event.  If I try these actions in the tag, I get the error "invalid for tag select according to TLD".  Any help would be greatly appreciated.
Question by:leawasson
    LVL 17

    Expert Comment

    <struts_html:select onchange="javascript:
    xt)" property="country" >
            <struts_html:options collection="countryOptions" property="value"
    labelProperty="label" />
    LVL 1

    Accepted Solution

    make sure you are using "onchange" with a lowercase 'c' instead of "onChange", the same with the "onclick" event. what version of struts are you using?

    Author Comment

    Thank you very much.  That was the problem.  All of the examples I could find use the onChange with an uppercase "C".  I found out last night how to look at the actual TLD inside the struts-el.jar and saw these attributes are indeed lowercase.

    Thank you very much for your prompt response.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now