Skip to content
Snippets Groups Projects
Commit 6eb38143 authored by Beaumont Mogridge's avatar Beaumont Mogridge :gorilla:
Browse files

adding files

parent eb1d664f
No related branches found
No related tags found
1 merge request!47Update static/testSearch.html, templates/OurSpaces.html, templates/Space.html,...
......@@ -11,7 +11,7 @@ def Load():
Name = "CodeBase";
conn = sqlite3.connect(DATABASE)
cur = conn.cursor()
cur.execute("SELECT * FROM coworking_spaces WHERE Name = 'CodeBase';")
cur.execute("SELECT * FROM 'coworking_spaces' WHERE Name =?;", [Name])
data = cur.fetchall()
print(data)
# cur.execute("SELECT Address FROM coworking_spaces WHERE Name =? ;", [Name])
......@@ -26,9 +26,9 @@ def Load():
# Website = cur.fetchall()
# cur.execute("SELECT Opening_Hours FROM coworking_spaces WHERE Name =? ;", [Name])
# Opening_Hours = cur.fetchall()
return render_template('Space.html', data = data)
return str(data)
conn.close()
return render_template('Space.html', data = data)
......
function loadSpaceInfo() {
var xhttp = new XMLHttpRequest();
xhttp.open("PUT", '/Load/CodeBase', true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.onreadystatechange = function() {
if (xhttp.readyState === 4 && xhttp.status === 200) {
console.log(xhttp.responseText);
// Below is the message to output onto the workspace page,
document.getElementById("loadText").innerHTML = xhttp.responseText;
} else {
// console.error(`Status Text: ${xhttp.statusText}.`);
// console.error(`Ready State: ${xhttp.readyState}.`);
}
};
xhttp.send();
}
......@@ -8,4 +8,4 @@
<li><a href="/Load/CodeBase">view CodeBase</a></li>
</head
</header>
<head>
<head>
<link rel="stylesheet" href="framework.css">
</head>
......@@ -27,11 +27,11 @@
</div>
<div class="Image box">
<img scr= {% block imageBlock%} {%endblock%}>
{% block imageBlock%}<img scr= >{%endblock%}
</div>
<div class="AddImage box">
<img scr="{% block addimageBlock%} {%endblock%}">
{% block addimageBlock%}<img scr=" ">{%endblock%}
</div>
<div class="times box">
......
......@@ -4,9 +4,11 @@
<h1 id="name"></h1><br>
<td>data</td>
<img src= Main_Photo><br>
<<script type="text/javascript">
<script type="text/javascript">
document.getElementById("name").innerHTML= data;
</script>
<script defer src+"Space.js"></script>
<p id="loadText">temp text</p>
<table border = 1>
<thead>
<td>Name</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment