In the Batman story, the Caped Crusader and the Boy Wonder are in pursuit of a gang of bank robbers who are under the seemingly magical protection of an old woman who appears to be a witch. She even flies around Gotham on a broom. The witch, in turn, is an agent of Batman's mysterious foe who calls himself the Outsider. The Outsider would later be revealed to be Bruce Wayne's butler Alfred, who had been killed off when editor Julius Schwartz took over the Bat titles and brought back to life as the Outsider with weird powers and a grudge against his former friend and employer.
A couple of years later, in Justice League of America #51, Zatanna finally locates her missing father Zatara with the help of magically created duplicates of all the super-heroes she'd encountered during the course of her quest: Hawkman, the Atom, Green Lantern, the Elongated Man and Batman. When Zatanna gathers the real heroes together to tell them about her adventure, Batman points out that, as far as he knows, he's never met Zatanna before. She then reveals that the witch he'd encountered earlier had been her in disguise and controlled by the Outsider.
One thing I wondered when I read Zatanna's Search is whether Gardner Fox originally intended the Detective Comics story to be part of the Zatanna story line when he wrote it, or if he retconned it in when he wrote the JLA story in order to get Batman into that story. To me, the latter scenario seems more likely.
First of all, there's absolutely nothing in the earlier story to suggest that the witch is Zatanna. In fact, there are quite a few things in the story that argue against it being her. For one thing, the witch does not speak her spells backward, which is the trademark of the Zatara family. Furthermore, the story seems to establish that the witch is not a real magical being at all, but that her seemingly magical powers come from her special broom given to her by the Outsider.
"Batman's Bewitched Nightmare", since it includes the Outsider, also represents another compromise Fox was forced to make because of the TV show. Since the show's producers were going to use Alfred, Fox was instructed to bring the character back. Thus, he abandoned his original plans for the identity of the Outsider, which, as far as I know, remain unknown to this day, and used him as the vehicle for Alfred's resurrection.