ITE254:WebProgramming2 Fall2018 Exam#3 Forthisexam,youwillcreatethenecessaryjQuery/Ajaxcodetocompletethe programdescribedbelow.Youmaynotaskforhelponthisexamnormayyou...

1 answer below »
ITE254:WebProgramming2 Fall2018

Exam#3
Forthisexam,youwillcreatethenecessaryjQuery/Ajaxcodetocompletethe
programdescribedbelow.Youmaynotaskforhelponthisexamnormayyou
consultanyotherhumanbeinginanyway.

GetStarted…

Ihavecreated2filesforyoutousewithinmyi:/drivedirectory.
Thefilesare…
calctotal_ajax.php
calctotal_jquery.html

Laptopuserscangetthefileshere…
http://newton.ncc.edu/gansonj/ite254/calctotal_jquery.txt
http://newton.ncc.edu/gansonj/ite254/calctotal_ajax.txt

Avideoofasamplerunoftheprogramcanbefoundat…
http://newton.ncc.edu/gansonj/ite254/vids/calctotal_video.mp4


YouwillonlyneedtowritethenecessaryjQuery/Ajaxwithinthe
'calctotal_jquery.html'filetogetthisprogramtowork.

Theuserwillenteracostandaquantity,youmustwritethejQueryandAjax
neededtocallthecalctotal_ajax.phppage.TheAjaxcodepagewillcalculatethe
totalandreturntheoutput.YourjQuerywilldisplaytheoutput.

Iftheuserentersavalueof100forthequantity,printtheoutputinpurple,for
anyotherquantityvalue,printtheoutputinthedefaultgreen.

Payattentiontoyourdatatypes!

Youwillonlyuploadyourrevisedversionofthecalctotal_jquery.htmlpage.
Nothingelse.ItmustworkwithmysuppliedAjaxfile.

YoumaynotaltermysuppliedPHP/HTML/CSScodeinanyway.
Answered Same DayMay 13, 2021

Solution

Swapnil Powar answered on May 13 2021
17 Votes

84016/calctotal_ajax.php
header('Access-Control-Allow-Origin: *');
$form_data = array(); //Pass back the data to `form.php`
if( isset( $_POST['cost'] ) && isset(...

Submit New Assignment

Copy and Paste Your Assignment Here