Create JavaScript for starting search