Whether on-line training or on-the-job training is more effective is to some degree a function of the kind of training involved. For paper and pencil kinds of learning, on-line training can certainly be effective, for example, learning how to use an inventory control system or a company's accounting methods. However, if a job involves any hands-on skills, in production, for example, there is no way to fully train a new employee or a transferred employee without providing that hands-on practice.
Another factor to consider is that in the United States, at least, now a primarily a service economy, soft skills reign. These are skills that are particularly difficult to teach, and I'm not convinced that most of these can be taught on-line. We learn how to deal with people by making mistakes and enduring the consequences of those mistakes, so there is no substitute for on-the-job training.