-
Notifications
You must be signed in to change notification settings - Fork 0
/
kontakt.html
125 lines (120 loc) · 7.31 KB
/
kontakt.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
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Kontakt - BOSCOP</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<a href="#main-content" class="visually-hidden">Zum Seiteninhalt springen</a>
<nav aria-label="Hauptnavigation">
<ul>
<li><a aria-current="false" aria-label="Zurück zur Übersicht" href="index.html"><img src="tt-logo.png" alt="Turnertech Logo"></a></li>
<li><a aria-current="false" href="index.html">Übersicht</a></li>
<li><a aria-current="false" href="funktionen.html">Funktionen</a></li>
<li><a aria-current="false" href="benefits.html">Benefits</a></li>
<li><a aria-current="page" class="active" href="kontakt.html">Kontakt</a></li>
</ul>
</nav>
<main id="main-content">
<div class="contact-box" role="form">
<form id="contact-form">
<h1 class="contact-text">Kontakt</h1>
<p class="small">Du hast Fragen zur Software? Lass uns dir helfen. Schicke eine Nachricht mit unserem Kontaktformular an uns.</p>
<p class="hint">Alle mit * markierten Felder sind Pflichtfelder.</p>
<div role="textbox" id="name-div">
<label id="name-label" for="name">Name* <br> <img src="Error.png" alt="Error" id="error-img4" class="error-img" style="display: none;"> <span id="name-error-text" style="font-weight: normal;"></span></label>
<input aria-required="true" type="text" class="input-field" name="name" id="name">
</div>
<div id="mail-div" role="textbox">
<label id="mail-label" for="mail">E-Mail Adresse* <br><img src="Error.png" alt="Error" id="error-img1" class="error-img" style="display: none;"><span id="mail-error-text" style="font-weight: normal;"></span></label>
<input aria-required="true" role="input" type="email" class="input-field" name="mail" id="mail">
</div>
<div id="betreff-div" role="textbox">
<label id="betreff-label" for="betreff">Betreff* <br><img src="Error.png" alt="Error" id="error-img3" class="error-img" style="display: none;"><span id="betreff-error-text" style="font-weight: normal;"></span></label>
<input aria-required="true" type="text" class="input-field" name="betreff" id="betreff">
</div>
<div id="message-div" role="textbox" role>
<label id="message-label" for="nachricht">Deine Nachricht* <br><img src="Error.png" alt="Error" id="error-img2" class="error-img" style="display: none;"><span id="message-error-text" style="font-weight: normal;"></span></label>
<textarea aria-required="true" class="input-field textarea-field" name="nachricht" id="nachricht" cols="30" rows="10"></textarea>
</div>
<button onclick="validateMessage(), validateBetreff(), validateMail(), validateName()" type="button" class="btn" role="buttonspr" >Nachricht abschicken</button>
</form>
</div>
</main>
<footer aria-label="Fußleiste"><span lang="en">No rights reserved <span aria-hidden="true"> · </span></span><a href="mailto:[email protected]">E-Mail: [email protected]</a></footer>
<script>
function validateMail()
{
var mail = document.getElementById("mail").value;
var regx = /^([a-zA-Z0-9\._]+)@([a-zA-a-zA-Z0-9])+.([a-z]+)(.[a-z]+)?$/
var text = document.getElementById("mail-error-text");
if(mail.match(regx)){
return true;
}
else {
document.getElementById("error-img1").style.display = "inline";
text.innerHTML = "Etwas stimmt mit deiner E-Mail Adresse nicht.";
text.classList.add("invalid");
document.getElementById("mail-label").classList.add("invalid");
document.getElementById("mail-div").classList.add("line");
document.getElementById("mail").classList.remove("input-filed");
document.getElementById("mail").classList.add("invalidform");
document.getElementById("mail").focus();
return false;
}
}
function validateMessage() {
var message = document.getElementById("nachricht").value;
var text = document.getElementById("message-error-text");
if(message == "" || message == null){
document.getElementById("error-img2").style.display = "inline";
text.innerHTML = "Bitte befülle das Textfeld mit deiner Nachricht.";
text.classList.add("invalid");
document.getElementById("message-label").classList.add("invalid");
document.getElementById("message-div").classList.add("linetextarea");
document.getElementById("nachricht").classList.remove("textarea-filed");
document.getElementById("nachricht").classList.add("invalidtextarea");
document.getElementById("nachricht").focus();
return false;
} else {
return true;
}
}
function validateBetreff() {
var betreff = document.getElementById("betreff").value;
var text = document.getElementById("betreff-error-text");
if(betreff == "" || betreff == null){
document.getElementById("error-img3").style.display = "inline";
text.innerHTML = "Bitte gib einen Betreff an.";
text.classList.add("invalid");
document.getElementById("betreff-label").classList.add("invalid");
document.getElementById("betreff-div").classList.add("line");
document.getElementById("betreff").classList.remove("input-filed");
document.getElementById("betreff").classList.add("invalidform");
document.getElementById("betreff").focus();
return false;
} else {
return true;
}
}
function validateName() {
var name = document.getElementById("name").value;
var text = document.getElementById("name-error-text");
if(name == "" || name == null){
document.getElementById("error-img4").style.display = "inline";
text.innerHTML = "Bitte gib deinen Namen an.";
text.classList.add("invalid");
document.getElementById("name-label").classList.add("invalid");
document.getElementById("name-div").classList.add("line");
document.getElementById("name").classList.remove("input-filed");
document.getElementById("name").classList.add("invalidform");
document.getElementById("name").focus();
return false;
}
}
</script>
</body>
</html>