IIS ASP - Prevent entry of punctuation

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > June 2006 > Prevent entry of punctuation





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Prevent entry of punctuation
PW

2006-06-18, 1:24 am


Hi,

Is there anyway to format a text input box to prevent any punctuation marks
from being entered?

TIA,
PW



Evertjan.

2006-06-18, 7:24 am

PW wrote on 18 jun 2006 in microsoft.public.inetserver.asp.general:
> Is there anyway to format a text input box to prevent any punctuation
> marks from being entered?


Not with serverside [ASP] code.
Text input boxes only exist clientside.
that is OT on this NG.

However, once the result has arrived on the server,
any string manipulation is possible:

<%
response.write result & "<br>"
%>

<script language='jscript' runat='server'>
result = request.form('mybox').replace(/\W+/g,'')
</script>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com