Convert ALL CAPS to Camel Case - Ajax/jQuery
Posted on 2012-04-06
I have an html form with a subject ALL CAPS from DB and I need to quickly convert it to camel case before saving back to Database.
<input id="subject" name="subject" Value="THIS SUBJECT IS ALL CAPS" />
I need an ajax function that will convert $('#subject').val(); to Camel Case on the form
I would like to call it using a link on the form:
= = = =
I would also like to force a lower case action on $('#message').val(); for the users tho post the entire message ALL CAPS. If the function can replace 'i' with 'I' and capitalize the start of paragraphs automatically that would be more than great.
Hope you can help.