KarinsDad said:How about Spiritual Weapon? You don't target the creature it is attacking, you target the Spiritual Weapon spell. Sometimes, you target an effect. For example, Charm Person. You might not know your friend is charmed, but he is acting strange and you think a mind affecting spell is the cause. As DM, I would allow you to target the effect which is on the creature.
The spiritual weapon summons a weapon of Force. While it doesn't state that the weapon is visible, it does not state that it is invisible when it mentions its touch AC. Therefore, you target the glowing flying weapon with dispel magic.
The charm person bit is, in my opinion, poor execution. That appears to be a case of targeting the intangible. However, I'd interpret it to be an exception because you know (or think you know) the spell is there. In effect you're targeting the friend but restricting the dispel magic. If your friend was instead the target of confusion, but you rolled a 1 on spellcraft, the dispel magic would, in my opinion, simply fail.