local h = UnitHealth("player")/UnitHealthMax("player")
Then rig that on the event UNIT_HEALTH, and you're set. Then do the same thing for the target frame, replacing all instances of player with target. Then, for mana, replace every instance of health with mana.
P.S. Dunno what the health frame really is, I'm just guessing.
Edit: Here is some code that should work when put somewhere in an Ace AddOn.
function AddOn:Update(unit, type)
if unit == "player" or "target" then
local t = Unit..type..(unit)/Unit..type..Max(unit)
if unit == "player" then
Edit2: Fixed the frame to the one I think it is supposed to be.