updated dialog.js(popup box working)