add javascript to prevent re-submit query