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
// THIS IS THE HTML FOR THE BUTTON CLIENT DELETE BUTTON | |
// onclick note: it is important we return the value of the confirmation to the form from the button | |
<button name='del' value='<?= $id ?>' onclick='return deleteClient("<?= $entreprise ?>")'>Delete</button> | |
// THIS IS THE JAVASCRIPT FUNCTION | |
function deleteClient(btn, clientName){ | |
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
<pre class='xdebug-var-dump' dir='ltr'> | |
<b>array</b> <i>(size=4)</i> | |
0 <font color='#888a85'>=></font> | |
<b>array</b> <i>(size=2)</i> | |
'driver_id' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'1'</font> <i>(length=1)</i> | |
'fname' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'Luke'</font> <i>(length=4)</i> | |
1 <font color='#888a85'>=></font> | |
<b>array</b> <i>(size=2)</i> | |
'driver_id' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'2'</font> <i>(length=1)</i> | |
'fname' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'James'</font> <i>(length=5)</i> |
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
$(document).ready(function(){ | |
onload(); | |
$(window).bind('resize', adjustContentLayout); | |
}); | |
//window.addEventListener('load', onload, false); | |
//window.addEventListener('resize', adjustContentLayout, false); | |
function onload(){ |
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 plugin attempt. | |
// problem: sessionActive() issues an jquery post call, i wanted sessionActive() to return the response but only way is to sync the request. how do you suggest a work around without cluttering jquery or should i just turn the request type to sync ?? | |
if( ! document.hasFocus() && methods.sessionActive() ) data.timeInactive = 0 ; | |
else methods.showWarning(); | |
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
// Javascript | |
$this.data('session',{ | |
timer : null // javascript interval timer | |
, timeInactive: 0 // time spent inactive | |
, warning : {} // warning object | |
}); | |
data = $this.data('session'); |
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
<?php | |
class singleton { | |
protected static $instance; | |
private function __construct(){} | |
private function __clone(){} | |
static public function load(){ | |
if(!self::$instance) return new singleton(); |