Before the war he studied law at University of Belgrade where he participated in various left-wing groups and was arrested. He also finished school for reserve officers and was a trained pilot.
After Axis invasion of Yugoslavia and establishment of Independent State of Croatia he came to Banja Luka where he joined resistance movement. As a reserve lieutenant he was drafted into the Croatian Air Force of the NDH. On 21 May 1942 he flew his Breguet 19 biplane and defected with his gunner Mišo Jazbec to Partisans. He landed near Partisan-controlled Prijedor.
The date would later be marked as the Day of Yugoslav Air Force.
Partisans immediately started to use their own plane. On 2 July 1942 Čajavec made an air raid on Banja Luka, which included strafing the local airfield, dropping bombs on important city buildings as well as leaflets on city streets.
The plane was damaged by anti-aircraft artillery, and Čajavec was forced to crashland on territory controlled by Chetniks. After they have surrounded him, Čajavec committed suicide to avoid being captured.
After the war Čajavec received the title of People"s Hero of Yugoslavia.
A television set factory in Banja Luka was named after him. The plot of 1979 film Partizanska eskadrila was partially inspired by his acting