Hi I have made a website with JavaScript and html were you type something into a textbox and it responds to you but when on an iOS device it is always making the first letter a capital and not recognizing the word. this has become very difficult. I have looked everywhere to find what I need and have come here as a last resort. I need some code to make the capital button not come up or make the text I write into the box be recognized if it has capitals or not. if you need any code to help please tell me and ill update it immediately with the code you need. I hope I can fix this problem.
Asked
Active
Viewed 157 times
2
-
Look at this post: [http://stackoverflow.com/questions/8334606/check-if-first-letter-of-word-is-a-capital-letter](http://stackoverflow.com/questions/8334606/check-if-first-letter-of-word-is-a-capital-letter) – N.R. Jan 07 '16 at 10:45
5 Answers
1
Before your treatment, you can add a Javascript Function toLowerCase http://www.w3schools.com/jsref/jsref_tolowercase.asp to convert your string in lower case, event if the string has one or all capitals letters.

J. Grunder
- 143
- 2
- 13
1
You can handle that using autocapitalize
attribute.
Try this: <input type="text" name="input" autocapitalize="off"/>

Rayon
- 36,219
- 4
- 49
- 76
0
This is what I would do:
<input id="myText" type="text" onkeyup="myFunction()">
function myFunction(){
document.getElementById("myText").value = document.getElementById("myText").value.toLowerCase();
}

Ahs N
- 8,233
- 1
- 28
- 33
0
val = val.substr(0, 1).toLowerCase() + val.substr(1);
or:
val = val.charAt(0).toLowerCase() + val.substr(1);

Aditya Shah
- 325
- 2
- 13
0
<asp:TextBox ID="TextBox1" runat="server" OnTextChanged="textChanged"></asp:TextBox>
and add this to .cs file:
protected void textChanged(object sender, EventArgs e)
{
TextBox1.Text = TextBox1.Text.ToLower();
}

Zahra
- 149
- 1
- 2
- 12