473,385 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Validate web form textbox on client side

As shown below, I can use onKeyPress for the html text box control, but
onKeyPress (client side) is not available to me using a web form text box to
do my validation on the client side. So how do I do client side validation
with a web form text box?

<asp:TextBox id="TextBox1" onKeyPress="javascript:Validatephone(this)"
style="Z-INDEX: 101; LEFT: 232px; POSITION: absolute; TOP: 56px"
runat="server" Width="216px" Height="24px"></asp:TextBox>

<INPUT id="txtPhone" onKeyPress="javascript:Validatephone(this)"
style="Z-INDEX: 102; LEFT: 248px; POSITION: absolute; TOP: 160px"
type="text">

Nov 22 '05 #1
0 894

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Techy | last post by:
I have two fields in my form so called : invoice and cash Now I want to validate this form on the client side with the help of javascript in such a way that if one of these fields is empy an...
19
by: Pete | last post by:
I have form/select which executes a function using onchange. No problem. However, when I validate the page with a strict HTML 4.01 doctype at http://validator.w3.org, it demands either an action or...
0
by: Jim M | last post by:
As shown below, I can use onKeyPress for the html text box control, but onKeyPress (client side) is not available to me using a web form text box to do my validation on the client side. So how do...
5
by: Jeff Evans | last post by:
I have a custom composite control which has a validator for a textbox. The validator and textbox are declared in the class and created in the CreateChildControls() method Here is the code for the...
11
by: wolf | last post by:
There are three webcontrol on my asp.net form: a TextBox, a submit button and a RegularExpressionValidator. And I had set ControlToValidate property of the RegularExpressionValidator to the...
10
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
0
by: Suresh.Eddala | last post by:
Hi, I am trying to do Form validation on client side by using atlas client-centric script. Grouping all the field validation by using "validationGroup" and on button click event checking the...
1
by: Ian | last post by:
I have an ASP.NET 2.0 page with a readonly textbox on it who's value is populated by a popup child window used for selecting from a list. I use a javascript function to pass the data back to the...
6
by: Tony Girgenti | last post by:
Hello. Developing a VS2005, SP4, VB, .NET 2.0, ASP.NET 2.0, web site program using a calendar. I tried using the validators to see if i can validate dates using a calendar control. It does...
6
by: Steve Ryan | last post by:
can anyone send me to some good examples of edit in place for data frid columns i see dot net let me assign a control in the IDE any good sources of reading on editing columns with controls...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.