hi I use watermark for textboxs below are code:
<script type="text/javascript">
window.onload = function SetColorOnPageLoad() {
var defalutNameText = "از";
var defalutTellText = "تا";
functionSetColor(document.getElementById("Txtejare1"), defalutNameText);
functionSetColor(document.getElementById("Txtejare2"), defalutTellText);
functionSetColor(document.getElementById("Txtrahn1"), defalutNameText);
functionSetColor(document.getElementById("Txtrahn2"), 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>
<asp:TextBox ID="Txtrahn2" runat="server" CssClass="vadi1" ForeColor="#b1b1b1" onblur="WaterMark(this, event,'تا');" onfocus="WaterMark(this, event,'تا');" Text="تا" ></asp:TextBox>
<asp:TextBox ID="Txtrahn1" runat="server" CssClass="vadi2" ForeColor="#b1b1b1" onblur="WaterMark(this, event,'از');" onfocus="WaterMark(this, event,'از');" Text="از"></asp:TextBox>
<asp:TextBox ID="Txtejare2" runat="server" CssClass="eja1" ForeColor="#b1b1b1" onblur="WaterMark(this, event,'تا');" onfocus="WaterMark(this, event,'تا');" Text="تا" onpaste="return false;"></asp:TextBox>
<asp:TextBox ID="Txtejare1" runat="server" CssClass="eja2" ForeColor="#b1b1b1" onblur="WaterMark(this, event,'از');" onfocus="WaterMark(this, event,'از');" Text="از" onpaste="return false;"></asp:TextBox>
now I want use thousand seprator for Txtrahn1 and Txtrahn2 so I add below code:
<div>
<script type="text/javascript">
$(function () {
ApplyThousandSeparator();
});
function ApplyThousandSeparator() {
$('#Txtrahn1,#Txtrahn2').priceFormat({
prefix: '',
thousandsSeparator: ',',
centsSeparator: ',',
limit: 12,
centsLimit: 0
});
}
//On UpdatePanel Refresh
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
ApplyThousandSeparator();
}
});
};
</script>
</div>
but when I add athousand seprator code it doesn't show water mark in textbox it display 0
see below image:

red arrow is for two other textbox that I don't define seprator for them
it will dispaly water mark
and green arrow is textboxs that I define both code for them thousand seprator and watermark but it will dispaly 0 ...
can you help me ?
best regards
neda