Guru Ji
asked on
Auto Format Text Box when User leaves the field
I have this field below
<tr bgcolor="#ECE9D8">
<td style="width: 171px"><span class="style8"><strong>Acc ount Number:</strong></span></t d>
<td style="width: 220px"><input id="Text20" style="width: 213px" type="text" / size="20" name="acctnum"></td>
</tr>
What I want to do is AutoFormat the text entered by a user when they leave the textbox
Do if the user enters 5060012345609 OR 506001234569
IT SHOULD FORMAT ITSELF TO 50600-123456-09 OR 50600-123456-9
PLEASE HELP
<tr bgcolor="#ECE9D8">
<td style="width: 171px"><span class="style8"><strong>Acc
<td style="width: 220px"><input id="Text20" style="width: 213px" type="text" / size="20" name="acctnum"></td>
</tr>
What I want to do is AutoFormat the text entered by a user when they leave the textbox
Do if the user enters 5060012345609 OR 506001234569
IT SHOULD FORMAT ITSELF TO 50600-123456-09 OR 50600-123456-9
PLEASE HELP
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Write-
I'd suggest you look at Peter Blums VAM controls. They are cheap. Powerful. And do exactly what you want:
http://www.peterblum.com/VAM/DataEntryControls.aspx?ReturnUrl=Home.aspx%23DataEntry
You may also want to check out the Telerik r.a.d.input control:
http://www.telerik.com/demos/aspnet/Input/Examples/Functionality/OrderForm/DefaultCS.aspx
Do those work for you?
Thanks~
Todd
I'd suggest you look at Peter Blums VAM controls. They are cheap. Powerful. And do exactly what you want:
http://www.peterblum.com/VAM/DataEntryControls.aspx?ReturnUrl=Home.aspx%23DataEntry
You may also want to check out the Telerik r.a.d.input control:
http://www.telerik.com/demos/aspnet/Input/Examples/Functionality/OrderForm/DefaultCS.aspx
Do those work for you?
Thanks~
Todd
Also-
On the free side of life, check out these resources:
http://ajax.asp.net/ajaxtoolkit/FilteredTextBox/FilteredTextBox.aspx <--Part of ASP.NET AJAX AjaxControlToolkit
http://www.codeproject.com/cs/miscctrl/maskedcsedit.asp
http://www.codeproject.com/jscript/Form_field_input_mask.asp
Thanks~
Todd
On the free side of life, check out these resources:
http://ajax.asp.net/ajaxtoolkit/FilteredTextBox/FilteredTextBox.aspx <--Part of ASP.NET AJAX AjaxControlToolkit
http://www.codeproject.com/cs/miscctrl/maskedcsedit.asp
http://www.codeproject.com/jscript/Form_field_input_mask.asp
Thanks~
Todd
ASKER
as after running it on my pc, I am unable to select that box again, The moment i Click on any box including that acctnum one, it just takes me to the end of the box and won't let me select the text atall.
If I select anything in the drop down menu it just goes to the end of the menu so fast, and its all happening since I a ran the script.
Is there any possibility to tweak the above code to run it only once