MotherTongueTxtBox.Attributes.Add(“onblur”,”val_Length(MotherTongueTxtBox.text,”hi friends”,Length);”)
in the above statement val_length s a javascript function in tat function the first parameter shd b the contents of the text box ,the second parameter s a string type,
is the statement correct i think it s wrong can u suggest a correct valid statement please
I had a little trouble understanding your question, but I think you’re asking that the first parameter be the textbox text, and the second be the length of the textbox text. This I think should work:
Remember that the above will render the html like:
In your original statement, the resulting (incorrect) html would have been something like:
Since
MotherTongueTxtBox.Textand.Lengthwould have beenstring.emptyand0respectively (unless it already had initial values…)EDIT:
Thanks for marking as solution. Just as a side note, one thing you may want to consider, is you don’t need to pass
this.value.lengthin as a parameter, since you’re already passing inthis.value. You could determine the length within your function. Just an idea though like this:And then in your javascript function: