Lab15
This commit is contained in:
		
							
								
								
									
										3
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/.bowerrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/.bowerrc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
{
 | 
			
		||||
    "directory": "public_html/bower_components"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/7-1.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/7-1.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
/* 
 | 
			
		||||
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
			
		||||
 * Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/Gruntfile.js to edit this template
 | 
			
		||||
 */
 | 
			
		||||
module.exports = function (grunt) {
 | 
			
		||||
    // Project configuration.
 | 
			
		||||
    grunt.initConfig({
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										13
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/bower.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/bower.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "lab16js_CalebFontenot",
 | 
			
		||||
    "version": "1.0.0",
 | 
			
		||||
    "main": "path/to/main.css",
 | 
			
		||||
    "ignore": [
 | 
			
		||||
        ".jshintrc",
 | 
			
		||||
        "**/*.txt"
 | 
			
		||||
    ],
 | 
			
		||||
    "dependencies": {
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/gulpfile.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Assignments/JavaScript/lab16js_CalebFontenot/gulpfile.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
/* 
 | 
			
		||||
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
			
		||||
 * Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/gulpfile.js to edit this template
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
var gulp = require('gulp');
 | 
			
		||||
 | 
			
		||||
gulp.task('default', function () {
 | 
			
		||||
    // place code for your default task here
 | 
			
		||||
});
 | 
			
		||||
@@ -0,0 +1,5 @@
 | 
			
		||||
file.reference.lab16js_CalebFontenot-public_html=public_html
 | 
			
		||||
file.reference.lab16js_CalebFontenot-test=test
 | 
			
		||||
files.encoding=UTF-8
 | 
			
		||||
site.root.folder=${file.reference.lab16js_CalebFontenot-public_html}
 | 
			
		||||
test.folder=${file.reference.lab16js_CalebFontenot-test}
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project xmlns="http://www.netbeans.org/ns/project/1">
 | 
			
		||||
    <type>org.netbeans.modules.web.clientproject</type>
 | 
			
		||||
    <configuration>
 | 
			
		||||
        <data xmlns="http://www.netbeans.org/ns/clientside-project/1">
 | 
			
		||||
            <name>lab16js_CalebFontenot</name>
 | 
			
		||||
        </data>
 | 
			
		||||
    </configuration>
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,8 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "lab16js_CalebFontenot",
 | 
			
		||||
    "version": "1.0.0",
 | 
			
		||||
    "keywords": ["util", "functional", "server", "client", "browser"],
 | 
			
		||||
    "author": "caleb",
 | 
			
		||||
    "contributors": [],
 | 
			
		||||
    "dependencies": {}
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,62 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<!--
 | 
			
		||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 | 
			
		||||
Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this template
 | 
			
		||||
-->
 | 
			
		||||
<html>
 | 
			
		||||
    <head>
 | 
			
		||||
        <title>Point Finder</title>
 | 
			
		||||
        <meta charset="UTF-8">
 | 
			
		||||
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
        <script>
 | 
			
		||||
            // Change the dialog labels if computation changes
 | 
			
		||||
            function onComputationSelect(computation) {
 | 
			
		||||
                alert("Selected " + computation);
 | 
			
		||||
                if (computation === "area") {
 | 
			
		||||
                    document.getElementById('input1Text').innerHTML = "Enter the base: ";
 | 
			
		||||
                    document.getElementById('input2Text').innerHTML = "Enter the height: ";
 | 
			
		||||
                } else if (computation === "pointDistance") {
 | 
			
		||||
                    document.getElementById('output').innerHTML;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            function onClick() {
 | 
			
		||||
                // Determine what the user wants us to do.
 | 
			
		||||
                if (selectComputation.value === "area") {
 | 
			
		||||
                    getArea();
 | 
			
		||||
                } else if (selectComputation.value === "pointDistance") {
 | 
			
		||||
                    getPointDistance();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            function getInput() {
 | 
			
		||||
                var input1Val = parseFloat(input1.value);
 | 
			
		||||
                var input2Val = parseFloat(input2.value);
 | 
			
		||||
                return [input1Val, input2Val];
 | 
			
		||||
            }
 | 
			
		||||
            function getArea() {
 | 
			
		||||
                var [baseVal, heightVal] = getInput();
 | 
			
		||||
                var area = (.5 * baseVal) * heightVal;
 | 
			
		||||
                document.getElementById('output').innerHTML = "The area of " + baseVal + " and " + heightVal + " is " + area;
 | 
			
		||||
            }
 | 
			
		||||
            function getPointDistance() {
 | 
			
		||||
                var [baseVal, heightVal] = getInput();
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
            function calculatePower() {
 | 
			
		||||
                alert("Not implemented!");
 | 
			
		||||
            }
 | 
			
		||||
        </script>    
 | 
			
		||||
    </head>
 | 
			
		||||
    <body>
 | 
			
		||||
        <label><label id="input1Text">Select a computation type to continue.</label><input type="text" id="input1" name="input1"></label><br>
 | 
			
		||||
        <label><label id="input2Text">Select a computation type to continue.</label><input type="text" id="input2" name="input2"></label><br>
 | 
			
		||||
        <label for="selectComputation">What do you want to do?</label>
 | 
			
		||||
        <select name="selectComputation" id="selectComputation"><br>
 | 
			
		||||
            <option value="" selected>-- Select computation type --</option>
 | 
			
		||||
            <option onclick="onComputationSelect(this.value);" value="area">Get Area</option>
 | 
			
		||||
            <option onclick="onComputationSelect(this.value);" value="pointDistance">Get Point Distance</option>
 | 
			
		||||
        </select>
 | 
			
		||||
        <br>
 | 
			
		||||
        <label id="output"></label><br>
 | 
			
		||||
        <input type="button" value="Compute!" onclick="onClick()">
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user