-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
&& Brittany Jones Ampers #45
base: master
Are you sure you want to change the base?
Conversation
TREKWhat We're Looking For
|
<!-- Reserve a trip --> | ||
|
||
<div id="reserve-trip" class="reserve-trip-form"> | ||
<form action="#" method="post" id="reservation-form"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your JavaScript should hide this form until there's a trip to submit details about.
<title>Ada Trek</title> | ||
<!-- <link rel="stylesheet" href="foundation.css"> --> | ||
<!-- <link rel="stylesheet" href="index.css"> --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/foundation.min.css" integrity="sha256-GSio8qamaXapM8Fq9JYdGNTvk/dgs+cMLgPeevOYEx0= sha384-wAweiGTn38CY2DSwAaEffed6iMeflc0FMiuptanbN4J+ib+342gKGpvYRWubPd/+ sha512-QHEb6jOC8SaGTmYmGU19u2FhIfeG+t/hSacIWPpDzOp5yygnthL3JwnilM7LM1dOAbJv62R+/FICfsrKUqv4Gg==" crossorigin="anonymous"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
<!-- Single Trip view --> | ||
<article id="trip" class="trip-info-list"> | ||
<h1 id="trip-name"></h1> | ||
<ul id="trip-summary"></ul> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've styled the single trip to show at the bottom rather than to the right.
console.log('reservation: success!'); | ||
}) | ||
.fail(function(response){ | ||
$('#fail').html('<p>Something went wrong!</p>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should output the validation errors like we did in class.
const url = $(this).attr('action'); | ||
const formData = $(this).serialize(); | ||
|
||
$.post(url, formData, (response) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using jQuery to do post requests rather than using Axios like we did in class?
const formData = $(this).serialize(); | ||
|
||
$.post(url, formData, (response) => { | ||
$('#confirmation-msg').html('<p>Made Reservation: ' + $('#trip-name').html() + '!</p>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This id #confirmation-msg
does not exist in the HTML page.
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions