•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,347 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,214 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 524 | Replies: 1
![]() |
Since no one is able to help me textfield validation in firefox.
I will start again from my roots and hopefully come up with a solution!
Now there are several ways of validating text fields using javascript.
I would like to know ALL of them and ill test which work for my problem.
So if you all could give small examples of restricting input to only text or numbers or any characters.
Then I can work from that and hopefully come up with a solution.
Thankyou, Regads X
I will start again from my roots and hopefully come up with a solution!
Now there are several ways of validating text fields using javascript.
I would like to know ALL of them and ill test which work for my problem.
So if you all could give small examples of restricting input to only text or numbers or any characters.
Then I can work from that and hopefully come up with a solution.
Thankyou, Regads X
•
•
Join Date: Mar 2008
Posts: 117
Reputation:
Rep Power: 1
Solved Threads: 13
you can go here http://articles.techrepublic.com.com...1-1044655.html
There are loads of other examples i just googled "restricting input to only text " and that is where i found the above link
I used regular expressions to prevent the user from entering non-numeric characters:
There are loads of other examples i just googled "restricting input to only text " and that is where i found the above link
I used regular expressions to prevent the user from entering non-numeric characters:
function checkNumeric(entry)
{
var numeric = /^[0-9]*$/;
if (!numeric.test(entry.value))
{
document.getElementById('errorText').style.display = '';
}else{
document.getElementById('errorText').style.display = 'none';
}
entry.value = entry.value.replace(/[^0-9]/g,"");
} Last edited by Thirusha : May 28th, 2008 at 10:37 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- problem with my radio button validation js (JavaScript / DHTML / AJAX)
- Dreamweaver php form validation and redirect (PHP)
- PHP: Form Validation (PHP)
- .net validation/javascript conflict (ASP.NET)
- Simple checkbox validation question (JavaScript / DHTML / AJAX)
- javascript validation (JavaScript / DHTML / AJAX)
- Javascript, Form fields validation and submit (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Dynamically resize iframe containing .php
- Next Thread: print something in new page


Linear Mode