This file contains hidden or 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
//Get query variables from URL string | |
function getQueryVariable(variable) { | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); if(pair[0] == variable) { | |
return pair[1]; | |
} | |
} |
This file contains hidden or 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
/***********************************************************************************************/ | |
/* | |
Contents | |
*/ | |
/***********************************************************************************************/ |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title>Untitled Document</title> | |
</head> | |
<body> | |
</body> |
This file contains hidden or 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
//Basic custom form validation | |
$('#formSave').on('click', function() { | |
$('input[data-required="true"]').each(function(){ | |
if($(this).val() === '') { | |
$(this).addClass('required').val('This field is required'); | |
} | |
}); | |
if (cfarray.length === 0) { | |
$('#selectedResults').addClass('required').text('This field is required') |
NewerOlder