19 May Html Programming
Outcomes
- Using ajax with jQuery.
- Process JSON data.
Scoring
- If the provided web pages in the provided project version cannot be opened or read, your score will be zero.
- Deductions will be made for not meeting the requirements i.e. names of files or folders as requested, functionality.
- Also, see the rubric for more specific grading information.
Repository
- In gitlab, create a new project named 383-H08-<section>-<UID>-FourRandomCharacters, where <section> is your section (A, B, C, D, or E); UID is your unique ID, and FourRandomCharacters are any four random characters.
- Make the following people developers on your project
- All sections: castroa (Instructor)
- Only section A: silwals (Teaching Assistant)
- Only section B, C: wangy75 (Teaching Assistant)
- Only section D, E: yeb2 (Teaching Assistant)
- Clone the project into your web folder (public_html/cse383/).
- Copy the existing form assignment project’s (Homework 07) files to this new folder (do not copy the .git/ folder).
Assignment
- Update the project such that it submits the data via an AJAX post.
- Upon a successful POST the application will receive JSON data which the application will then display.
API
- You will use the following API for POSTING your data.
- url
- ceclnx01.cec.miamioh.edu/~castroa/cse383/homework08/form-ajax.php
- Data Sent
- user: string
- affiliation: string
- comment: string
- car: string
- color: string
- Result:
- data[]
- user
- affiliation
- comment
- car
- color
- timestamp
- status: “OK” or “FAIL”
- msg: String
- if OK, it will also contain data[]
- data[]
- Note: This only responds to a POST request.
Requirements
- Your HTML application will start with the form.
- After validating all inputs (as you already should have done), override the submit so that it makes an jQuery/ajax POST call to the above URL.
- Upon success and if status == ok, hide the form and display the returned data as a table.
- Upon an error, display an error message to the user.
- At the bottom of the page, place a button that will cause the form to be unhidden which will allow the user to enter new form data.
- Make sure you HTML is valid, indented, and well commented
Details
- You must place ALL javascript in an external script file.
- You still must validate the user input via jQuery before calling submit.
- You must check for ajax post errors. I will randomly (about 50% of the time) cause the API to return errors. If you get an error you should show an appropriate message to the user.
Comments
- Making the ajax call.
- You need to make sure to set the content type of the sending ajax when making the call as well as making sure to stringify the data object.
- Then part of the ajax call will look like:
- $.ajax( {
- url: …,
- contentType: ‘application/json’,
- data: JSON.stringify(dataFromForm),
- $.ajax( {
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
