On July 23, 2003, Sony purchased Steve Koren and Mark O'Keefe's spec script, named "Click", for $1.75 million with plans for it to be an Adam Sandler film produced by Revolution Studios, Columbia Pictures, and Neal H. Moritz's company Original Film; the purchase occurred as the Koren-and-O'Keefe-penned "Bruce Almighty" (2003) had grossed $236 million domestically in its two month run. "Click" was the second comedy Moritz produced for Columbia Pictures, after "Not Another Teen Movie" (2001). Although Sony planned filming to begin in April 2004 after Sandler finished shooting "Spanglish" (2004), that was postponed for Karen and O'Keefe to rewrite the script under the supervision of Juan Jose Campanella, who was also planned to direct the film as announced by "Variety" on May 12, 2004. However, he was replaced by Frank Coraci, who previously directed Sandler vehicles "The Wedding Singer" (1998) and "The Waterboy" (1998), in March 2005. Executive producer Tim Herlihy was also enacted several script revisions. Christopher Walken joined the cast on February 23, 2005.