You cant do this if you want to show the attack and damage separately. If you just want to show the final result, and dont need to show hit and damage separately it can be done. If the system uses armor as reducing damage, though, then attacks which miss, and attacks which hit but do no damage against armour, will be identical. They'll both show damage 0. Probably the best way that feels most like a tabletop game is to have the attack roll print out a button along with the attack result. Players can click the button to roll the damage, and it prompts them for the damage bonus through a dropdown query.