i have form can enter beginning time , ending time reservation in restaurant. want check, if there exists reservation in database interferes timespan have entered in form. how can that?
client validation:
- times compatible open-for-business hours of selected restaurant.
- times provided valid reservation: 'from' , 'to' not reversed , leave enough time order, prepare , dine (is restaurant-dependent).
assuming client validation passed call server api reservation request. server should respond appropriate error.
as added user experience benefit server should able provide client list of available reservation windows, customer doesn't have brute force reservation till passes availability check.
http://api.jquery.com/jquery.post/ how talk api. if using angularjs or framework check documentation communicating external resources, cross domain communication.
Comments
Post a Comment