This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
//<![CDATA[ | |
//Not Tested for Accessiblity | |
/** | |
* List Filter | |
* @usage: <input type="search" onkeyup="Listfilter(this,'_id')" /> | |
* where _id is the id of the list container | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
function peopleCheck(el) | |
{ | |
var options = el.list.options; | |
for (var i = 0; i< options.length; i++) { | |
if (el.value == options[i].value) | |
//option matches: work is done | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.fadein {position:relative;height:300px;width:450px} | |
@keyframes fade { 0% {opacity:0} 11.11% {opacity:1} 33.33% {opacity:1} 44.44% {opacity:0} 100% {opacity:0}} | |
.fadein img {position:absolute;left:0;right:0;opacity:0;animation-name:fade;animation-duration:18s;animation-iteration-count:infinite} | |
.fadein img:nth-child(1) {animation-delay:0s} | |
.fadein img:nth-child(2) {animation-delay:3s} | |
.fadein img:nth-child(3) {animation-delay:6s} | |
.fadein img:nth-child(4) {animation-delay:9s} | |
</style> | |
<div class='fadein'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/questions/30499199/html5-datalist-to-select-only-predefined-options | |
<script> | |
function peopleCheck(el) | |
{ | |
// nothing is done if no value selected - allow empty | |
if (el.value == "") return; | |
var options = el.list.options; | |
for (var i = 0; i< options.length; i++) { | |
if (el.value == options[i].value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To add a full-email field: | |
Click View > Add Columns | |
In the Show Columns dialog do the following: | |
Click New Column button | |
In the New Column dialog specify a name for the new column |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class N2 { | |
// based on Rick Hopkins MooTools Notify | |
//<button onclick="n2 = new N2({title:'My Title',content:'My body'})">My N2 Notify</button> | |
//<button onclick="n2 = new N2({text:'MyCombined Title::My combined body',classes:['inlineNotice']})">My N2 text Notify</button> | |
//<button onclick="n2 = new N2({text:'MyCombined Title::My combined body',classes:['notify-warn']})">My N2 text Warn</button> | |
//<button onclick="n2 = new N2({text:'MyCombined Title::My combined body',classes:['notify-alert']})">My N2 text Alert</button> | |
constructor (opts) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConsentX { | |
// based on Creare's 'Implied Consent' EU Cookie Law Banner v:2.4 | |
// Conceived by Robert Kent, James Bavington & Tom Foyster | |
constructor () { | |
this.dropCookie = true; // false disables the cookie, allowing you to style the banner | |
this.cookieDuration = 14; // days before the cookie expires, and the banner reappears | |
this.cookieName = 'complianceCookie'; // name of our cookie | |
this.cookieValue = 'on'; // initial value of cookie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QF2 { | |
// based on MooTools QuickForm, created by Rick Hopkins | |
//<button onclick="QF = new QF2({title:'This is a Title',content:'Hello'});">QF Content</button> | |
//<button onclick="QF = new QF2({title:'This is a Title',url:'https://testing0.micore.us/qf2/form.html'});">QF Url</button> | |
//<button onclick="QF = new QF2({title:'This is a Title',url:'https://testing0.micore.us/qf2/form.html',data:{key:'value'}});">QF Url with Post Data</button> | |
constructor (opts) { | |
// clear all previously made QuickForms | |
var qf = document.querySelector('.quickform'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/63460485/exporting-html-to-word | |
<script> | |
//<![CDATA[ | |
function Export2Doc(element, filename = ''){ | |
var preHtml = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word' xmlns='http://www.w3.org/TR/REC-html40'><head> <meta charset='utf-8'><title>Export HTML To Doc</title></head><body>"; | |
var postHtml = "</body></html>"; | |
var html = preHtml+document.getElementById(element).innerHTML+postHtml; | |
var blob = new Blob(['\ufeff', html], { | |
type: 'application/msword' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>https://stackoverflow.com/questions/30058927/format-a-phone-number-as-a-user-types-using-pure-javascript</p> | |
<input id="phoneNumber" placeholder="Phone Number" maxlength="16" /> | |
<script> | |
isNumericInput = (event) => { | |
const key = event.keyCode; | |
return ((key >= 48 && key <= 57) || // Allow number line | |
(key >= 96 && key <= 105) // Allow number pad |
NewerOlder