2014-01-10 10:03:07 +00:00
|
|
|
function sm_delete(id, type) {
|
|
|
|
var del = confirm("Are you sure you want to delete this record?");
|
|
|
|
if (del == true) {
|
2014-01-28 23:57:36 +00:00
|
|
|
var loc = 'index.php?action=delete&id=' + id + '&type=' + type;
|
2014-01-10 10:03:07 +00:00
|
|
|
window.location = loc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function trim(str) {
|
|
|
|
return str.replace(/^\s+|\s+$/g,"");
|
|
|
|
}
|
2014-01-28 23:57:36 +00:00
|
|
|
|
2014-01-10 10:03:07 +00:00
|
|
|
//left trim
|
|
|
|
function ltrim(str) {
|
|
|
|
return str.replace(/^\s+/,"");
|
|
|
|
}
|
|
|
|
|
|
|
|
//right trim
|
|
|
|
function rtrim(str) {
|
|
|
|
return str.replace(/\s+$/,"");
|
2014-01-28 23:57:36 +00:00
|
|
|
}
|