среда, 30 мая 2012 г.
вторник, 22 мая 2012 г.
add a lot of space at the beginning of the table cell
td{padding-bottom:0;padding-left:4px;padding-right:0;padding-top:0;}
среда, 16 мая 2012 г.
change element border style
document.getElementById("arid1000000039").style.border='1px solid #ff0016';
var myStyle = document.getElementById("arid1000000039").style; myStyle.borderBottomColor = "#BBC4C9"; myStyle.borderLeftColor = "#6B7479"; myStyle.borderRightColor = "#BBC4C9"; myStyle.borderTopColor = "#6B7479";
validating zip/Postal
var reg = /^\d*$/; var ch = null; try { if (reg.test(document.getElementById("arid1000000039").value)) { ch = "true"; } else { ch = "false"; } } catch (err) { ch = "Unrecognized character"; } if (ch != null) { F(536870938).S(new CharType(ch)); }
validating IncNum
ie:
function checkIncNumKeyUp(e) { var e = window.event || e; var str = document.getElementById("arid1000000161").value.toString(); var reg = /^INC\d*$/; var myStyle = document.getElementById("arid1000000161").style; F(1000000161).S(str.toUpperCase()); if ((e.ctrlKey) && (e.keyCode == 86)) { var afterReplace = str.replace(/\s/ig, ""); F(1000000161).S(afterReplace); } if (str.length > 20) { F(1000000161).S(afterReplace.substring(0, 20)); } if (str.length > 0) { if (!reg.test(document.getElementById("arid1000000161").value)) { document.getElementById("arid1000000161").style.border = '1px solid #ff0016'; } else { myStyle.borderBottomColor = "#BBC4C9"; myStyle.borderLeftColor = "#6B7479"; myStyle.borderRightColor = "#BBC4C9"; myStyle.borderTopColor = "#6B7479"; } } }
ff:
function checkIncNumKeyDown(e) { var e = window.event || e; return ((e.keyCode > 47) && (e.keyCode < 58) ||
(e.keyCode == 8) || (e.keyCode == 73) || (e.keyCode == 78) || (e.keyCode == 67) ||
(e.keyCode > 95) && (e.keyCode < 106) || (e.ctrlKey) &&
(e.keyCode == 67) || (e.ctrlKey) && (e.keyCode == 86) ||
(e.keyCode == 37) || (e.keyCode == 39)); }
function checkIncNumKeyUp(e) { var str = document.getElementById("arid1000000161").value.toString(); var reg = /^INC\d*$/; var myStyle = document.getElementById("arid1000000161").style; F(1000000161).S(str.toUpperCase()); if ((e.ctrlKey) && (e.keyCode == 86)) { F(1000000161).S(F(1000000161).G().toString().replace(/\s/g, "")); } if (str.length > 0) { if (!reg.test(document.getElementById("arid1000000161").value)) { document.getElementById("arid1000000161").style.border = '1px solid #ff0016'; } else { myStyle.borderBottomColor = "#BBC4C9"; myStyle.borderLeftColor = "#6B7479"; myStyle.borderRightColor = "#BBC4C9"; myStyle.borderTopColor = "#6B7479"; } } }
Подписаться на:
Сообщения (Atom)