Skip to content

Instantly share code, notes, and snippets.

pappelt

Block or report user

Report or block pappelt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pappelt
pappelt / JavaScript-File with URL-Params
Created Jan 14, 2013
Hand over params into js-files via URL
View JavaScript-File with URL-Params
Put this into the file, where you want to use the params:
function parseQuery ( query ) {
var Params = new Object ();
if ( ! query ) return Params; // return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) continue;
var key = unescape( KeyVal[0] );
View datetime.php
$dateformat = 'Y-m-d\TH:i';
$timezone = 'Europe/Berlin';
$_sPickupDateTimeObj = new DateTime('now + 1 day', new DateTimeZone($timezone));
$_sPickupDateTime = $_sPickupDateTimeObj->format($dateformat);
@pappelt
pappelt / AjaxRequest-Indicator
Created Nov 21, 2011
Show if Ajax-Requests are send/running/stopped
View AjaxRequest-Indicator
//needs a div with id='log' in the DOM.
$(document).ajaxStart(function() {
$('#log').text('Ajax-Request started');
});
$(document).ajaxStop(function() {
$('#log').text('Ajax-Request stopped');
});
$(document).ajaxComplete(function() {
You can’t perform that action at this time.