Basic AI Locked Axis

Ok I’ve been looking on this form, the Script Reference and searching several tutorials and I can’t seem to find the answer to this question "How to make a basic AI similar to 3D platformer enemies that only rotate to look at the player on one axis. Every were I look all I find is this code.

     function Update () 
    {
    	myTransform.rotation = Quaternion.Slerp (myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), Time.deltaTime);
}

But this rotates the enemy on all axis so if my player character jumps and there is a forward translate added the enemy floats upward to meet him in the air. How do I restrict the axis or is this not the right method for doing this kind of AI?

Found the answer here: http://forum.unity3d.com/threads/36377-transform.LookAt-or-Quaternion.LookRotation-on-1-axis-only