removed deprecated write javascript method