First, you don't need to manually set the attribute in the attribute button.
You can ask the attribute button to manage the attribute directly by setting its attribute:
The beauty of doing so is it will display the attribute value and sync with Maya, automatically. You don't need to worry about the namespace, or coding, etc.
If for some reason you cannot ask it to manage the attribute directly, in the command where you tried to set the attribute, you needed to count in the current namespace:
from maya import cmds
ns = cmds.MGPickerView(q=True, ns=True)
attr = "{}:L_Leg_FK".format(ns) if ns else "L_Leg_FK"
cmds.setAttr(attr, 1)
It is python code but similar in MEL.
The video tutorial here might help: https://www.youtube.com/watch?v=hULSxdECKps