I would like to know I would be able to convert the following codes into apex equivalent.
<button type="submit">
<span></span>
</button>
I can't use <apex:commandButton>
, as it is being rendered as <input>
which is a single tag. I need to add an icon into the button that's why I have a <span>
inside the button tag as I am using bootstrap.
Best Answer
To further illustrate Eric's comment, You would implement his suggestion like so:
Define your button (the button calls the javascript function
doSomething
) that is defined by theactionFunction
:Define your controller action:
Define your
actionFunction
(this calls the controller action):