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
//scroll id into view | |
bpid = ${processId}; | |
if(bpid) { | |
var divid = document.getElementById('${processId}'); | |
divid.scrollIntoView(true); | |
} | |
// TEST INPUT | |
var numbersOnly = /^\d+$/; | |
var decimalOnly = /^\s*-?[1-9]\d*(\.\d{1,2})?\s*$/; |
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
//http://www.evotech.net/blog/2007/04/named-html-entities-in-numeric-order/ | |
/**Custom Bullets on anything:*/ | |
.S20_processing:before { | |
margin-right:2px; | |
padding:2px 6px; | |
content: "\2022 "; | |
color: yellow; | |
background-color:#ccc; |
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
Setting up Documentation for PHP Projects With Doxygen | |
Separate Subdirectory "doxygen" for docs | |
Index.php for doxygen: | |
auto directory | |
.... | |
foreach($dirlist as $file) { | |
if ($file["type"] == "dir") { |
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
//Add keydown event to textbox | |
$('SKUSearch').addEvent('keydown', function(event) { | |
if(event.key == "enter") { | |
PPI.searchSku($('SkuForm')); | |
} | |
}); | |
AJAX JSON | |
/** send the request */ | |
new Request.JSON({ |
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
TRY/CATCH Format | |
try{ | |
$_rs = $this->db->query($searchSQL, $_bind); | |
while ($_row = $this->db->fetch($_rs)){ | |
# check the open date */ | |
if (count(Core::datesBetween($_row["open_date"], date("Y-m-d"))) > 30) { | |
$_row["open_date_desc"] = "<b style='color: red'>" | |
.date("Y m/d",strtotime($_row["open_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
PHPTAL HINTS | |
SELECTED ROW CLASS | |
<tr tal:attributes="class php: p.selected ? 'active' : NULL" > | |
SELECT OPTION SELECTED | |
<div tal:repeat="row rows"> | |
<select name="value"> | |
<option | |
tal:repeat="option options" |
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 | |
/** | |
* @brief: job application for websites | |
* @created: 2010/07 | |
*/ | |
class JobApp | |
{ | |
// config |
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 type="text/javascript"> | |
//<[CDATA[ | |
window.addEvent('domready', function(){ | |
// onload functions here | |
}); | |
function overlay() { | |
el = document.getElementById("overlay"); |
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 id="HoursEntry" | |
name="hours" | |
type="number" | |
pattern="[-+]?[0-9]*[.]?[0-9]+" | |
value="${hours}" | |
maxlength="5" | |
size="5" /> |
OlderNewer