|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
JavaScript - Lostfocus
On lostfocus of a Textbox, I want to displaya Label which will display and show 1% of the value entered in the text box and if the value in TextBox is Invalid then Error.
Kindly guide me |
|
#2
|
|||
|
|||
|
What do you mean by 1% of the value?
For example, when entered value is "ABCDEFGHIJ" (10 characters) you only want to display "A" (1% of the 10, right?) |
|
#3
|
|||
|
|||
|
If anyone enters 10000, it will display 100.
|
|
#4
|
|||
|
|||
|
Any Help ?
|
|
#5
|
|||
|
|||
|
Looks difficult ?
|
|
#6
|
|||
|
|||
|
Quote:
Hi, Don't know whether u r still looking for this. Found this in some forum (something like dotnetspider) while browsing 4 my problem. Technically am not competent to comment on the code. Perhaps it might be useful to u in case u r looking 4 same. Code:
<script type="text/javascript">
function first()
{
document.getElementById('TextBox2').value = 2 * document.getElementById'TextBox1').value;
}
</script>
<body>
<asp:TextBox id="TextBox1" onblur="first()" runat="server"></asp:TextBox>
<asp:TextBox id="TextBox2" runat="server"></asp:TextBox>
</body>
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > JavaScript - Lostfocus |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|