modify JSGetSelected, to fetch properly selected items before submit event