These are chat archives for Colt/WDB-General

18th
Jun 2018
Tadej Danev
@tadejdanev
Jun 18 14:41
guys quickest way to close form/window?
Will Adams
@bushblade
Jun 18 14:42
@tadejdanev window.close()
Tadej Danev
@tadejdanev
Jun 18 14:43
<input type="button" value="ZAPRI OKNO" onlick="window.close()" nothing happens :P
Will Adams
@bushblade
Jun 18 14:51
@tadejdanev do it in javascript not a onclick attribute
Tadej Danev
@tadejdanev
Jun 18 14:53
haven't done js yet
Will Adams
@bushblade
Jun 18 14:56
ok so in html
<button id="close">Close Tab</button>
and in js
document.getElementById('close').addEventListener('click', function () {
  window.close()
})
Tadej Danev
@tadejdanev
Jun 18 14:57
will try :)
i must be doing something wrong :)
Will Adams
@bushblade
Jun 18 15:04
@tadejdanev works in that codepen for me, though I'm surprised codepen let you use window.close()
Tadej Danev
@tadejdanev
Jun 18 15:05
it worked for you? really?
i'm on firefox, you?
Will Adams
@bushblade
Jun 18 15:05
chrome
Yeah just tried it in FF and it doesn't work
Tadej Danev
@tadejdanev
Jun 18 15:07
what's the difference between....<input type="button" and <button> thingie :P
found: Inside a <button> element you can put content, like text or images. This is the difference between this element and buttons created with the <input> element.
Tadej Danev
@tadejdanev
Jun 18 15:13
i'm sure it should be done better somehow :P
Will Adams
@bushblade
Jun 18 15:20
even in FF if you open the window (like a mini popup window) with window.open('your-file.html') then window.close() should work. I personally would use a modal instead though.
Tadej Danev
@tadejdanev
Jun 18 18:52
never worked with modal :P
Tadej Danev
@tadejdanev
Jun 18 19:47
Brief: On the iPROM website, we want to capture the data of visitors who want to receive news from the field of digital advertising. We want to capture the user name and the high-end email address. In order to legally capture the information and use it for the purpose of sending news, we must follow the GDPR guidelines, so the user must agree to the GDPR notice (check mark) before the data is actually sent. After successfully passing the process, the user should receive a thank-you message, and the form will be automatically closed. Every usable person must be able to close the form. Instructions: 1. Prepare an online form with two input fields, and a checkbox to agree with the GDPR Notice on the Use of Data 2. All information is compulsory 3. Data should be sent at https://data.iprom.si/novice/prijava 4. Provide a good UX (user experience) - mobile, desktop 5. Appearance should match the CGP website http://iprom.si/ 6. Consider how the form will be displayed and behave on a website