create source view via javascript