Dynamic Form Actions using javascript