Using the button element in normal HTML you can do the following:

<button type="submit">
   &lt;img src="/images/icons/tick.png" alt=""/&gt;  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">                                         
   &lt;img src="/images/icons/tick.png" alt=""/&gt;  Save                       
                                                                
</s:submit>

is gets rendered in the following way:

&lt;img src="/images/icons/tick.png" alt=""/&gt;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">
  &lt;img src="/images/icons/tick.png" alt=""/&gt;  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!
-- 
View this message in context: 
http://www.nabble.com/S2-Cannot-get-Submit-button-body-to-render-as-label...-tf4517330.html#a12885672
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to