<script language="javascript" type="text/javascript">
function RemoveSpecialChar(u_name) {
u_name.value = u_name.value.replace(/[ \/ , {} [ \] % @ # ! $ & * ` \\ ~ + = " ; ? ( ) | < > ' ^ :-]+/g, "");
}
</script>
<s:textfield name="u_name" cssClass="input_field" javascript:RemoveSpecialChar(this); valid(this)"></s:textfield>
function RemoveSpecialChar(u_name) {
u_name.value = u_name.value.replace(/[ \/ , {} [ \] % @ # ! $ & * ` \\ ~ + = " ; ? ( ) | < > ' ^ :-]+/g, "");
}
</script>
<s:textfield name="u_name" cssClass="input_field" javascript:RemoveSpecialChar(this); valid(this)"></s:textfield>