Continue developing the Munchin Lunchin web site. This time you have more leeway, but you must do at least the following:
<style> section instead of using JavaScript. It's better
coding, after all. So no use of the DOM nodes' style attribute or the
jQuery css() function.
fetch(), you may switch to the
jQuery .ajax() or .post().
<h2> regions should be in the Antique Heritage font. See
https://www.fontspace.com/antique-heritage-font-f57562.
You will need to add extra margins.
type=text or
type=number with step=0.01). You may use the display style
in this one case to cause it to appear. As the user types a number into the
input area representing a bill amount, a
list of possible gratuity amounts should appear, looking something like this:
bill: $49.23 with 15% tip: $56.61 with 18% tip: $58.09 with 20% tip: $59.08 with 25% tip: $61.54This computation must be conducted entirely within the web page, using JavaScript. You may want to make use of the JavaScript function
toFixed().
You can make the list as simple or as fancy as you like; you could, for
instance, format it as a Bootstrap table.
As before, your web page should be self-contained and it should validate without warnings or errors. The CGI program may be written in PHP (preferably) or Python, Perl, or Java. The AJAX call must invoke the same CGI program that generates the original page.
To get extra credit, you must document the extra work, preferably in a comment in your CGI program.
selectionStart and substr().
Turn in your CGI program (a single file called cafe-4.php
or cafe-4.cgi or a ZIP package containing your CGI program and a template
file) via Canvas.