var digits="0123456789"
var temp
if (form.SSN3.value=="") {
alert("Please enter your Social Security Number.")
form.SSN3.focus();
return false;
}
for (var i=0;i<form.SSN3.value.length;i++){
temp=form.SSN3.value.substring(i,i+1)
if (digits.indexOf(temp)==-1){
alert("Only numbers are accepted in Social Security Number.")
form.SSN3.focus();
return false;
}
}
[ 1 comment ] ( 9 views ) | permalink |




( 2.9 / 234 )// created by www.dpwebservices.net
function listbox_day ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($dayf=01;$dayf<=31;$dayf++) {
if ($default == $dayf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".date(d, mktime(0,0,0,0,$dayf,2000))."\" $selected class=\"field\">".date(j, mktime(0,0,0,0,$dayf,2000))."</option>\n";
}
$result.="</select>\n";
return $result;
}
function listbox_month ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($monthf=01;$monthf<=12;$monthf++) {
if ($default == $monthf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".date(m, mktime(0,0,0,$monthf,1,2000))."\" $selected class=\"field\">".date(M, mktime(0,0,0,$monthf,1,2000))."</option>\n";
}
$result.="</select>\n";
return $result;
}
function listbox_year ($name, $start, $end, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($yearf=$end;$yearf>=$start;$yearf--) {
if ($default == $yearf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"$yearf\" $selected class=\"field\">$yearf</option>\n";
}
$result.="</select>\n";
return $result;
}
function listbox_hour ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($hourf=1;$hourf<=12;$hourf++) {
if ($default == $hourf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".date(h, mktime($hourf,0,0,0,0,2000))."\" $selected>".date(g, mktime($hourf,0,0,0,0,2000))."</option>\n";
}
$result.="</select>\n";
return $result;
}
function listbox_24hour ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($hourf=00;$hourf<=23;$hourf++) {
if ($default == $hourf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".date(H, mktime($hourf,0,0,0,0,2000))."\" $selected>".date(H, mktime($hourf,0,0,0,0,2000))."</option>\n";
}
$result.="</select>\n";
return $result;
}
function listbox_min ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($minf=00;$minf<=59;$minf++) {
if ($default == $minf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".date(i, mktime(0,$minf,0,0,0,2000))."\" $selected>".date(i, mktime(0,$minf,0,0,0,2000))."</option>\n";
}
$result.="</select>\n";
return $result;
}
function listbox_week ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
$weekx = '0';
for ($week_count=strftime("%U"); $week_count>=1; $week_count--) {
$weekx ++;
$str = '-'.$week_count.' week Monday';
if (($timestamp = strtotime($str)) === -1) {
$weekmsg = "The string ($str) is bogus";
} else {
$weekmsg = "Week ".$weekx." - ".date('F j',$timestamp);
$weekdate = date(m.'/'.d.'/'.y,$timestamp);
}
// echo $default; weekx to select the week
if ($default == $weekdate) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".$weekdate."\" $selected>".$weekmsg."</option>\n";
}
$result.="</select>\n";
return $result;
}
// onChange=\"MM_goToURL('parent','#');return document.MM_returnValue\"
function listbox_nummon ($name, $default=0) {
$result="<select name=\"$name\" size=1 class=\"submit\">\n";
for ($dayf=1;$dayf<=48;$dayf++) {
if ($default == $dayf) {$selected="selected";} else {$selected="";}
$result.="<option value=\"".$dayf."\" $selected>".$dayf."</option>\n";
}
$result.="</select>\n";
return $result;
}
/*
example of echos
<?php echo listbox_month("month", 7); ?> /
<?php echo listbox_day("day",23); ?> /
<?php echo listbox_year("year", 1994, 2003, 2001); ?>,
<?php echo listbox_hour("hour", 12); ?>:
<?php echo listbox_min("min", 00); ?>
);
<br>
<?php echo listbox_month("month2", 1); ?> /
<?php echo listbox_day("day2", 2); ?> /
<?php echo listbox_year("year2", 1994, date(Y), 2002); ?>,
<?php echo listbox_hour("hour2", 11); ?>:
<?php echo listbox_min("min2", 59); ?>
Below is to call the current "week - month day" back to week 1 in a pulldown menu...
echo listbox_week("week", strftime("%U"));
*/
[ add comment ] ( 7 views ) | permalink |




( 3 / 185 )A few hints when dealing with "between date" searches, these are corrections to oracle manuals that don't tell you to handle this properly:
SELECT *
FROM
Your Table
WHERE
DTM_COLUMN BETWEEN TO_DATE('03-01-2006', 'MM-DD-YYYY') AND TO_DATE('03-17-2006', 'MM-DD-YYYY')+1
By using the +1 you get the data between 3/01 to 3/17
Without the +1 you get the data between 3/01 to 3/16
----
Another hint, if you have any queries like the following, you best fix them before the year rolls over...
SELECT *
FROM
WHERE
TO_CHAR(DTM_COLUMN, 'MM-DD-YYYY') BETWEEN '03-01-2007' AND '03-17-2007'
The above example works fine until you change the start year to 2006...
Oracle can not search TO_CHAR unless it is within the same year...
[ add comment ] ( 5 views ) | permalink |




( 2.9 / 214 )Simple PHP code of the day....
Example Scenario: Let's say you have multiple loops coming out of the database, and you are adding "checked" to specific checkboxes.
Normally you could just do something like this:
$temp = "myVarName".$i;
$$temp = "checked";
But now let's say you have multiple loops breaking out in your <tr>...
Scary stuff people...
How would you echo $$temp ?
HINT: <?php echo $$temp; ?> will not work in this scenario...
hmm give up?
Here's your Answer:
${"myVarName".$i}
And that's the Simple PHP code of the day...
[ add comment ] ( 8 views ) | permalink |




( 3 / 191 )<html>
<head>
<script language="Javascript">
function setClipBoardData(){
setInterval("window.clipboardData.setData('text','')",20);
}
function blockError(){
window.location.reload(true);
return true;
}
window.onerror = blockError;
</script>
</head>
<body onload="setClipBoardData();">
</body>
</html>
[ add comment ] ( 8 views ) | permalink |




( 3 / 237 )
Calendar


