Register scripts and AJAX