kousis
asked on
checking the value in textbox
hi
I 've got textfield, while entering the text, it should check for the each and every alphabet and should give message if alphabet is repeated
for eg. if i am entering "alpha" it should give alert message while entering the "a" second time.
TIA
I 've got textfield, while entering the text, it should check for the each and every alphabet and should give message if alphabet is repeated
for eg. if i am entering "alpha" it should give alert message while entering the "a" second time.
TIA
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in case you do NOT want it case sensitive
Michel,
not to criticize you. But do you remember the conversaion we had about this a long time ago. And that we both agreed on not "steeling" each others "answers"? Because that is what you are doing right now. I'm not going to defend myself after your comment...but I'd appreciate it if you too would keep that in mind.
Regards,
CJ
not to criticize you. But do you remember the conversaion we had about this a long time ago. And that we both agreed on not "steeling" each others "answers"? Because that is what you are doing right now. I'm not going to defend myself after your comment...but I'd appreciate it if you too would keep that in mind.
Regards,
CJ
1. I am not steeling since I am only adding to your code, not posting a new version
2. If you really want to we can discuss how many questions you manage to put your clammy little hands on lately. It could be hard to get the points to stay in the advanced ee with you around ;-)
Michel
2. If you really want to we can discuss how many questions you manage to put your clammy little hands on lately. It could be hard to get the points to stay in the advanced ee with you around ;-)
Michel
1) True...
2) Not true... I have big hands, but even then it's not true. The thing was that we had a deal, and the only recent question that I can recall that I jumped in a question in which you were active was something about an onload function not being called due to the <!-- and //-->. Which was a totally different comment than any of yours.
Again, I am not critizing, but just reminding. I don't feel anything for an argument.
regards,
CJ
2) Not true... I have big hands, but even then it's not true. The thing was that we had a deal, and the only recent question that I can recall that I jumped in a question in which you were active was something about an onload function not being called due to the <!-- and //-->. Which was a totally different comment than any of yours.
Again, I am not critizing, but just reminding. I don't feel anything for an argument.
regards,
CJ
Comments are always welcome - it is complete pieces of code that bothers me more - and only if they are variations and then gets accepted as answers
Michel
Michel
Michel,
but that's exactly what you have just done. You might see it as an addition to my comment, but still it's a complete piece of code.
but that's exactly what you have just done. You might see it as an addition to my comment, but still it's a complete piece of code.
additional addition: it's a complete piece of code which is the same as I wrote but with one change...
I mean something like this:
<html>
<head>
<script>
function validate(tObj)
{
var alfabet="";
var val = tObj.value;
for(i=0;i<val.length;i++)
{
ch = val.charAt(i).toLowerCase( );
if(alfabet.indexOf(ch)>=0)
{
alert("Invalid character: "+val.charAt(i))
return false;
}
alfabet += ch;
}
}
</script>
</head>
<body>
<form name="myForm">
<input type="text" onKeyUp="validate(this)">
</form>
</body>
</html>
Just posting a changed function is not what I meant.
You are being a bit protective today huh?
Kousis: Please forgive our discussion and accept CJ's answer.
Michel
<html>
<head>
<script>
function validate(tObj)
{
var alfabet="";
var val = tObj.value;
for(i=0;i<val.length;i++)
{
ch = val.charAt(i).toLowerCase(
if(alfabet.indexOf(ch)>=0)
{
alert("Invalid character: "+val.charAt(i))
return false;
}
alfabet += ch;
}
}
</script>
</head>
<body>
<form name="myForm">
<input type="text" onKeyUp="validate(this)">
</form>
</body>
</html>
Just posting a changed function is not what I meant.
You are being a bit protective today huh?
Kousis: Please forgive our discussion and accept CJ's answer.
Michel
Michel,
I'm not going to argue...
I'm not going to argue...
<observation>
lounge might be a better place for this discussion than in a Q.
</observation>
Cd&
lounge might be a better place for this discussion than in a Q.
</observation>
Cd&
This question is still open today, waiting for your response.
Please finalize this question, or update us as to what else you need. There are several working comments and you have several open questions.
Thank you very much. Your attention to this is appreciated so others may benefit from this question,
once finalized, since it will move to our PAQ and others can find help from this as well.
Klaetu
moderator @ experts-exchange
Please finalize this question, or update us as to what else you need. There are several working comments and you have several open questions.
Thank you very much. Your attention to this is appreciated so others may benefit from this question,
once finalized, since it will move to our PAQ and others can find help from this as well.
Klaetu
moderator @ experts-exchange
kousis,
Every question you have ever asked is still open. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days.
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11039425
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20177400
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163586
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163383
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20134855
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11808378
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20130338
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20108322
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11809519
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20007642
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11857019
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11856898
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11856518
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11781498
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11723119
Thanks,
Netminder
Community Support Moderator
Experts Exchange
Every question you have ever asked is still open. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days.
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11039425
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20177400
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163586
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20163383
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20134855
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11808378
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20130338
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20108322
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11809519
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20007642
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11857019
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11856898
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11856518
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11781498
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11723119
Thanks,
Netminder
Community Support Moderator
Experts Exchange
Force/accepted by
Netminder
Community Support Moderator
Experts Exchange
Netminder
Community Support Moderator
Experts Exchange
for(i=0;i<val.length;i++) {
ch = val.charAt(i).toLowerCase(
if(alfabet.indexOf(ch)>=0)
alert("Invalid character: "+val.charAt(i))
return false;
}
alfabet += ch;
}
Michel