updated event handlers in index.js for accessory section (on edit.php page)