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

1 answer below »
instructions on pdf


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

Answer To: ITE254:WebProgramming2 Fall2018 Exam#3...

Swapnil answered on May 13 2021
149 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( $_POST['quantity'] ) ) {
    // $_POST['cost'] * $_POST['quantity'];
    $form_data['result'] = $_POST['cost'] * $_POST['quantity'];
    echo json_encode($form_data);
} // ends isset IF check
?>
__MACOSX/84016/._calctotal_ajax.php
84016/calctotal_jquery.html
    
    
        
            Calculate Total Cost
            Purchase 100 items and you get purple output
        
        
        
            Cost of item
            
            
            Quantity
            
            
            
            
        
        
        
            
        
        
    
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here