I have done this in IE but unable to in firefox.

So can someone generate a simple piece of code using javascript that will allow me to PHYSICALLY ONLY enter Numbers\Letters\Etc. Not a message popping up once the form is submitted stating that I have numbers where letters should be etc. Just so that I am physically unable to enter text or numbers into the text field.

Thanks, Regards X

Recommended Answers

All 6 Replies

Hi OmniX!

What do you want exactly? Is it that you want to validate the field with only text or with only number? If it is clear to me than only I will try or may be in a position to solve your problem.

I have several fields that I want only TEXT, only NUMBERS and only SPECIAL CHARACTERS (specific ones).

Javascript I want is that it wont let you PHYSICALLY input the wrong chracters.

Eg. Letters only then no numbers, etc.

I was able to do this in IE but unable to in FF.

I would like a solution for FF.

Understand what I mean now? Thanks

just so you know if you use javascript for this people can still paste things into the textbox, unless you disable ctrl+v and right clicking on the text box ;)

Ya I know the problem I had in IE.

Well you got any other ideas than not to use javascript?

Or any ideas how to disable crtl+v?
(Dont need to disable right click to paste code into a cell, I think)
I asked this before and I got no answers a while back :(

Main question how to validate text field in FF!!

Ya I've an idea. Do 1 think. In the INPUT tag use READONLY.

It will work, actually it works in my case.

If urproblem is solved, Please mark it solved

Are you reading this thread(even the title) at all?

I said how to validate input in firefox?

Please read before posting and do not post message without reading the thread creating unrequired messages. ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.