Rodrigo Quezada
|
Posted: 02/05/2004, 4:47 AM |
|
HI, I need in CCS, texbos in from imput text in ucase and convert in lowercase.
|
|
|
Nicole
Posts: 586
|
Posted: 02/05/2004, 6:10 AM |
|
Rodrigo,
You can use client side or server side.
On client side create control’s onChange event or form’s onSubmit event. Use Java script function to convert the entered values.
document.forms.form_name.field_name.value.toLowerCase();
If you want to change the values on server side you can do it in different ways. If you want to convert the value before displaying it on the live page use Before Show event, if the value should be converted before inserting to database use Before Build Insert/Update events http://docs.codecharge.com/studio/html/index.html?http:...Insert.html?toc
Related ASP functions are LCase and Ucase:
Dim MyString
Dim LCaseString
MyString = "VBSCript"
LCaseString = LCase(MyString) ' LCaseString contains "vbscript".
_________________
Regards,
Nicole |
|
|
marcwolf
Posts: 361
|
Posted: 02/05/2004, 5:50 PM |
|
We have done this using a little JS snippet
function ucase(frmObj) {
var tmpStr;
tmpStr = frmObj.value.toUpperCase();
frmObj.value = tmpStr;
}
function lcase(frmObj){
var tmpStr;
tmpStr = frmObj.value.toLowerCase();
frmObj.value = tmpStr;
}
And then in the OnFocus /OnBlur event on the Format/Event section of a control put in either
javascript:lcase(this);
or
javascript:ucase(this);
Both work very well and does not require a Server hit.
Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
|
|
|
|