hi
I used below code to change checkboxs appereance an show password in textbox...
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../scripts/icheck.js"></script>
<link href="../skins/square/red.css" rel="stylesheet" />
<script type="text/javascript">
window.onload = function () {
ApplyCss();
};
function ApplyCss() {
$('input').iCheck({
checkboxClass: 'icheckbox_square-red',
radioClass: 'iradio_square-red',
increaseArea: '20%' // optional
});
};
//On PostBack
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
ApplyCss();
}
});
};
</script>
<script type="text/javascript">
$(function () {
$('#Chpass').on('ifChecked', function (event) {
$("#txtpass").attr("type", "text");
});
$('#Chpass').on('ifUnchecked', function (event) {
$("#txtpass").attr("type", "password");
});
});
</script>
in this page are 2 other textboxs that I used watermark for them :
<script type="text/javascript">
window.onload = function SetColorOnPageLoad() {
var defalutNameText = "با پیشوند آقا یا خانوم وارد نمایید";
var defalutTellText = "جستجو بر اساس کد ملک";
functionSetColor(document.getElementById("TxtName"), defalutNameText);
functionSetColor(document.getElementById("Txtsearch"), defalutTellText);
}
function functionSetColor(Textbox, WaterMark) {
if (Textbox.value.length > 0 && Textbox.value == WaterMark) {
Textbox.style.color = "#b1b1b1";
} else {
Textbox.style.color = "black";
}
}
function WaterMark(txt, evt, msg) {
if (txt.value.length == 0 && evt.type == "blur") {
txt.style.color = "#b1b1b1";
txt.value = msg;
}
if (txt.value == msg && evt.type == "focus") {
txt.style.color = "black";
txt.value = "";
}
}
</script>
now problem is that when I add above code(put watermark for textbox)
2 other javacodes (checkboxs and show password in textbox) codes that I put at first of question doesn't work...
best regards
neda