We present a method using the SALT2 light curve fitter to determine the
redshift of Type Ia supernovae in the Supernova Legacy Survey (SNLS)
based on their photometry in g', r', i' and z'. On 289 supernovae of the
first three years of SNLS data, we obtain a precision $\sigma_{\Delta
z/(1+z)} = 0.022$ on average up to a redshift of 1.0, with a higher
precision of 0.016 for z<0.45 and a lower one of 0.025 for z>0.45.
The rate of events with $|\Delta z|/(1+z)>0.15$ (catastrophic errors)
is 1.4%. Both the precision and the rate of catastrophic errors are
better than what can be currently obtained using host galaxy photometric
redshifts. Photometric redshifts of this precision may be useful for
future experiments which aim to discover up to millions of supernovae Ia
but without spectroscopy for most of them.