Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4630

<s:submit> generates a value attribute for type=image which violates W3C

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.3.29, 2.5
    • None
    • None
    • Windows Professional 7, with IBM Rad 8.5 and Webserver 7.0

    Description

      I have the following <s:submit> code:

      <s:submit action="shipment_deleteShipperFromChosenShipperViewList" type="image" src="/llr/theme/delete.gif" onclick="clearDirtyFlag();deleteShipperFromChosenShipperViewList('%

      {organizationInfo.orgId}

      ');" tabindex="16"/>

      which generates the following HTML:

      <input type="image" alt="Submit" src="/llr/theme/delete.gif" id="shipment_shipment_deleteShipperFromChosenShipperViewList" name="action:shipment_deleteShipperFromChosenShipperViewList" value="Submit" tabindex="16" onclick="clearDirtyFlag();deleteShipperFromChosenShipperViewList('1');"/>

      The W3C Markup Validator marks the HTML as an error. The error message is

      > Attribute value not allowed on element input at this point.

      Evidently value is not an allowed attribute when the type is image. I asked how do I keep Struts2 from generating the value attribute on Stack Overflow and they recommended I create a Jira. I hope I have done it correctly. Thanks!

      Attachments

        Activity

          People

            aleksandr-m Aleksandr Mashchenko
            ponder6168 Kendall Ponder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: