![]() |
| |||||||
| Sponsored Links |
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi, If someone enters High School in a text box i want to make it H.S. If someone enters university in a textbox I want to make it Unv I tried the replace function in javascript but i think i messed it up somewhere Any idea todd |
| Sponsored Links |
|
#3
| ||||
| ||||
| for one, post your code. for two, what if they type in Univ ... or College or etc. well, hopefully you get what i'm getting at. why not use a drop down box so that they will always be what you want them to be.
__________________ Quote of the Month: Quality: The race for quality has no finish line- so technically, it's more like a death march. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
|
#4
| |||
| |||
| hi, this is the code i have Code: if (getinstnamemem.length > 0)
{
getinstnamemem=getinstnamemem.replace("High School", "H.S.");
getinstnamemem=getinstnamemem.replace("University", "Unv");
}
but if someone enters university it doesnt change it to Unv can someone tell me how i can make it happen todd |
|
#5
| ||||
| ||||
| There is really no good way to do what you are trying to do. The number of permutations are almost infinite, even if you upper or lower case the string prior to doing the replace: High School High School High School University Univ. Univ are all different.
__________________ Wolffy ------------------------ Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change to Reputation System | jmurrayhead | Announcements | 0 | June 2nd, 2008 09:57 PM |