-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
113 lines (104 loc) · 3.42 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!--
The initial page of our project
What does it do:
Asks for input of the drug
initiates callForID.html which will hand off the information to the queryForID.js
-->
<!DOCTYPE html>
<html>
<head>
<title>Drug Info</title>
<meta charset="utf-8"/> <!-- Fixes an issue FireFox is having -->
<!-- Initialize a global WBK function -->
<script src="https://cdn.rawgit.com/maxlath/wikidata-sdk/dist/dist/wikibase-sdk.min.js"></script>
<!-- Initialize a global wdk object using the WBK object -->
<script src="https://cdn.rawgit.com/maxlath/wikidata-sdk/dist/dist/wikidata-sdk.min.js"></script>
<style>
section {
width: 800px;
margin: 0 auto;
}
form {
color: white;
text-align: center;
}
h1 {
color: lightblue;
text-align: center;
margin-top: 5%;
}
p {
color: white;
text-align: center;
}
body{
background-color: #208DED;
margin-left: 8%;
margin-right: 8%;
}
#format {
width: 400px;
}
a{
color: white;
font-size: 20px;
}
#picture{
position:relative;
float: left;
width:500px;
height:0%;
}
</style>
</head>
<a href="aboutUsPage.html">About Us</a> <!--Extra page click button:)-->
<body>
<section>
<h1> Enter your drug of choice </h1>
<form action="./callForID.html" method="GET" target="_blank">
<!--
<input type="text" name="drug" id="drug" required>
-->
<!--
Goal: To make a dynamic list for the user, showing and allowing searching through the possible drugs available
at WikiData
Reason: Not all drugs are loaded on WikiData, this would allow the user to know what this can be used for
Issue: The creation of dynamic list is working, with proper loading of the data, however when submitting, it
does not send the choice to callForID.html. Reason unknown
Potential Solution: If the issue is with the loading of the data (relatively slow) a creation of local - provider-hosted textfile
that would store the name-data and could be periodically updated to reflect up-to-date WikiData registry
-->
<script type="text/javascript" src="listOfKnownDrugs.js"></script>
<label for="drug"> Drug: </label>
<input type="datalist" id="format" name="drug" list="drug" required>
<datalist id="drug">
<option value="none">
</datalist>
<p> </p>
<input type="checkbox" name="chbx0" value="true" checked>
LD50
<input type="checkbox" name="chbx1" value="true" checked>
Chemical Structure
<input type="checkbox" name="chbx2" value="true" checked>
Primary Pharmacology
<input type="checkbox" name="chbx3" value="true" checked>
Significant Drug Interaction
<input type="checkbox" name="chbx4" value="true" checked>
Articles
<input type="checkbox" name="chbx5" value="true" checked>
Pregnancy Category
<!-- The code above adds checkboxes to the website so the user can choose what data they want to be showcased in the tree
-->
<p> </p>
<br>
<input type="submit" value="Submit">
<p>Welcome to our drug information website! Enter the drug or chemical compound you wish to investigate, and we will show you all the information available on it on Wikidata.</p>
</form>
</section>
<div id="picture"> <!--CLickable logo of WikiData, goes to website.-->
<a href="https://www.wikidata.org/wiki/Wikidata:Main_Page" target="_blank">
<img src="./graphics/wikiLogo.png" height="20%" width="20%" alt="WikiData logo"
></a>
</div>
</body>
</html>