We fabricated lateral junctions by crossing superconductingNb strips in metallic contact with a ferromagnetic NiFe strip. Transport measurements on the Nb lateral junctions exhibit modulations of the critical current with a varying perpendicular magnetic field similar to a Fraunhofer interference pattern, which demonstrates the dc Josephson effect. The modulations of the critical current could be attributed to an effective weak link embedded in the Nb strip and formed a Josephson junction. Appearance of Shapiro steps on the current-voltage curves of these junctions when microwaves irradiation is applied proves the ac Josephson effect. The underlying physics of the effective weak link induced by the NiFe strip is discussed.