billgloff wrote:
Using the button element in normal HTML you can do the following:
<button type="submit">
<img src="/images/icons/tick.png" alt=""/> Save
</button>
which gives you an icon along with the label on the button itself.
When I attempt to try the same thing using S2 tags e.g.
<s:submit theme="simple" type="button">
<img src="/images/icons/tick.png" alt=""/> Save
</s:submit>
is gets rendered in the following way:
<img src="/images/icons/tick.png" alt=""/>Save
<button type="submit" id="someForm_0" value="Submit">Submit</button>
I also have tried using the following inside the body with no luck.
<s:param name="body">
<img src="/images/icons/tick.png" alt=""/> Save
</s:param>
How can I add an icon to my button?
I do not understand why any text in the tag body gets pushed out to the
front of the tag.
Thanks for any help on this!
s:submit is rendering an <input type="submit"..., not a <button... so
the behaviour you're seeing is expected. If you want a button element,
set <s:submit>'s 'type' attribute to 'button', as listed in the tag docs
[1].
L.
[1] http://struts.apache.org/2.x/docs/submit.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]