Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I dont know how to do this. How do I implement these conditions below: 1. Saving and deleting new categories When the user fills up

I dont know how to do this. How do I implement these conditions below:

1. Saving and deleting new categories When the user fills up the form to add a new category, you should have a JS function to listener the form submission. Through this function you will get the form data and send it to the server (PHP file) as an AJAX POST REQUEST. Once you have completed it and you got the success, you should append the new category to the category list without reloading the page (a simple DOM append function). Similarly, whenever the user clicks on a delete/remove button (or link), AJAX should be used to send this information to the server to remove this item from database. The response should be the updated category list without the removed element (without reloading).

2. Periodically checking the number of products in a category Using setInterval function in JavaScript, configure your system to dynamically check with the server to find out the number of products for each category (on the home page). Use AJAX to retrieve this information from the server, and dynamically update the Web page. Also, when the user click in the categories, (s)he should be able to see all the categories in a lightbox (or modal box like bootstrap) without reload or change the page (over the pager that the user is in that moment). Some details about the lightbox can be found here: https://www.w3schools.com/howto/howto_js_lightbox.asp.

3. Adding new products Use AJAX to send all the product information to the server. Also, when the user click in the add new product, (s)he should be able to see all the categories in a lightbox (or modal box like bootstrap) without reload or change the page (over the pager that the user is in that moment). Some details about the lightbox can be found here: https://www.w3schools.com/howto/howto_js_lightbox.asp.

4. Periodically checking for new orders in the admin page Using setInterval function in JavaScript, configure your system to dynamically check with the server to find out if there are new orders from any user. Use AJAX to retrieve this information from the server, and dynamically update the Web page.

5. Periodically checking for new products Using one of the timer functions in JavaScript, make the user initial page dynamically check back with the server to see if there are any new products using AJAX. In order to avoid sending the full list of products back each time, you should keep track of the date/time when the page was loaded or most recently updated and use this to ensure that only new information is sent back. Keep in mind that the process of inserting new products into the page may require a non-trivial amount of programming to ensure that all the required pieces are put in their proper location (e.g., embedded div tags). Since the system is designed to show ten posts 12 products, this dynamic updating should only occur on the first page of the products. As new products are added, the old ones should be removed from the bottom to ensure that the page continues to only show the ten most recent products.

6. Add to the cart and add to the Wishlist You should use an AJAX based function to add products to the cart or wishlist without reloading the page. Since some of the pages of your system will each be modified, you should ensure that they are still HTML5 compliant (following the syntax rules of XTHML), use CSS, and that there is a proper separation of the specification of the content from the specification of the presentation rules, the specification of the JavaScript code, and the specification of the PHP processing code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

What is the difference between fusing and sintering?

Answered: 1 week ago

Question

How flying airoplane?

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago