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
/* head */ | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
<script type="text/javascript" src="/shared/plugins/jquery.ui.map.js"></script> | |
<script type="text/javascript" src="/shared/plugins/jquery.ui.map.overlays.js"></script> | |
<script type="text/javascript" src="/shared/plugins/jquery.ui.map.extensions.js"></script> | |
/* style */ | |
<style> | |
.ui-mobile-rendering>*{visibility:visible;} | |
#map_canvas { |
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
<%@ page import="java.text.SimpleDateFormat" %> | |
<%@ page import="java.util.Date" %> | |
<%= new SimpleDateFormat("yyyy").format(new Date()) %> |
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
//top of script | |
var startTime = (new Date()).getTime(); | |
//complete function or bottom | |
var endTime = (new Date()).getTime(); | |
var millisecondsLoading = endTime - startTime; | |
$("#timer").append("Loaded in: " + millisecondsLoading + " seconds"); |
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
<input type="password" id="OLD_PASSWORD" name="OLD_PASSWORD" value="" /> | |
<input type="checkbox" value="option" id="showPass" name="showPass" /> |
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
//usage | |
NEW_PASSWORD: { | |
required: true, | |
minlength: 7, | |
notEqual: "#OLD_PASSWORD", | |
}, | |
//function | |
jQuery.validator.addMethod("notEqual", function(value, element, param) { | |
return this.optional(element) || value != $(param).val(); | |
}, "Please specify a different (non-default) 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
function makeMenu(json) { | |
var html = "<ul>"; | |
$.each(json,function(key,val){ | |
html += "\n<li>"; | |
if (typeof val === "object") | |
html += key +"\n" + makeMenu(val); | |
else | |
html += key + ": " + val; | |
html += "\n</li>"; | |
}); |
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
jQuery.fn.ForceNumericOnly = | |
function() | |
{ | |
return this.each(function() | |
{ | |
$(this).keydown(function(e) | |
{ | |
var key = e.charCode || e.keyCode || 0; | |
// allow backspace, tab, delete, arrows, numbers and keypad numbers ONLY | |
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
<a href="javascript:{}" onclick="document.getElementById('theFormName').submit();">submit</a> | |
or | |
<a href="#" onclick="return doMyBidding();">submit</a> |
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
// create an array of coordinates to zoom on | |
var latlng = [{ | |
name: "South West Marker", | |
latlng: new google.maps.LatLng(swLat, swLng) | |
}, { | |
name: "North East Marker", | |
latlng: new google.maps.LatLng(neLat, neLng) | |
}]; | |
var latlngbounds = new google.maps.LatLngBounds(); | |
for (var i = 0; i < latlng.length; i++) { |
OlderNewer