Skip to content

Commit

Permalink
Merge pull request #12 from arc12012/BrisBranch
Browse files Browse the repository at this point in the history
Bris branch
  • Loading branch information
clj13001 committed Dec 7, 2016
2 parents cc1257d + ded9041 commit cab4dd7
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
Binary file added WebContent/html/imgs/potato.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
<%@ page import = "database.MySQLAccess" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
MySQLAccess myaccess = new MySQLAccess();
myaccess.connectDB();
String name = myaccess.getResult()[0][0];
String description = myaccess.getResult()[0][1];
String hardware = myaccess.getResult()[0][2];
//out.println(name);
//out.println(description);
//out.println(hardware);
%>

<script type=text/javascript>
//gets variables for database data
(function(){
window.myname = "<%=name%>";
window.mydesc = "<%=description%>";
window.myhard = "<%=hardware%>";
})();
//get all the option buttons
var options = document.getElementsByClassName('option');
var dev0 = {
var dev7 = {
name: window.myname,
description: window.mydesc,
hardware: window.myhard,
software:"potato"
software:"intel"
};
var dev1 = {
Expand Down Expand Up @@ -50,7 +79,7 @@ var dev6 = {
software:"intel"
};
var devices = [dev0, dev1, dev2, dev3, dev4, dev5, dev6];
var devices = [dev1, dev2, dev3, dev4, dev5, dev6, dev7];
options[0].addEventListener('click', showAll);
for(var a = 1; a < options.length; a++){
options[a].addEventListener('click', show);
Expand Down Expand Up @@ -136,4 +165,7 @@ function isUnavailable(id){
}
}
return 0;
}
}
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion WebContent/html/javascript/navbar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion WebContent/html/webpages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2>Return</h2>
</a>
</div>
<div>
<a class = "divlink" href = "listingPage.html">
<a class = "divlink" href = "listingPage.jsp">
<div class = "menuOption">
<h2>All Items</h2>
<p>Just curious to see what devices we have to offer? You've come to the right place.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="utf-8">
Expand Down Expand Up @@ -72,7 +73,7 @@ <h2>Device Dictionary</h2>
<div id = "devContainer"></div>
</div>

<script src="../javascript/listing.js"></script>
<%@ include file="../javascript/listing.jsp" %>
<script src = "../javascript/navbar.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/features/

0 comments on commit cab4dd7

Please sign in to comment.