473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

text masking

Ike
I have a form which calls a cgi-app.This cgi expects a date to perform a
database query. The fields in the DB are in dd-mm-yyyy format, so everthing
works fine while the correct string is entered.
I don't want to validate the string when the submit event occurs,
actually i would like to have some kind of input mask over the input text(
that's what I'm told to do).
Basically, is there an HTML/javascript way to do that which doesn't
involve onsubmit validation or activeX including.
Thanks in advance, Ike

Jun 12 '06 #1
4 1931

Ike wrote:
I have a form which calls a cgi-app.This cgi expects a date to perform a
database query. The fields in the DB are in dd-mm-yyyy format, so everthing
works fine while the correct string is entered.
I don't want to validate the string when the submit event occurs,
Client-side validation is for convenience. You should still do
server-side validation.
actually i would like to have some kind of input mask over the input text(
that's what I'm told to do).
Then simply use an input element with password as its type:

<input type = "password">
Basically, is there an HTML/javascript way to do that which doesn't
involve onsubmit validation or activeX including.


ISTM your question isn't quite clear. What exactly are you asking?
I'm getting the following from you:

1. How to get an input mask over a input text. (see above solution)
or
2. How to validate a form without using javascript. (use server side
validation)

Please clarify.

Jun 13 '06 #2
Ike
I'm trying to create a means, in a text field, say, wherein it permits 4
numerics, a dash, two numerics, a dash, two numerics, for, say yyyy-mm-dd.
The dashes should be visible in the text box. I am wondering if there is a
way to do this in javascript. THanks, Ike
Jun 13 '06 #3
Ike wrote:
I'm trying to create a means, in a text field, say, wherein it permits 4
numerics, a dash, two numerics, a dash, two numerics, for, say yyyy-mm-dd.
The dashes should be visible in the text box. I am wondering if there is a
way to do this in javascript. THanks, Ike


Here's a guide by J. R. Stockton: "Javascript Date and Time 4 :
Validation" http://www.merlyn.demon.co.uk/js-date4.htm

Keeping the hyphens visible and in position sounds tricky. Sites that
accept date entry usually have a field each for day, month and year.

Regards,

--
Kam-Hung Soh
http://kamhungsoh.blogspot.com - It Mostly Works
http://members.optusnet.com.au/khsoh - Software That Mostly Works

Jun 13 '06 #4
JRS: In article <11**********************@j55g2000cwa.googlegroups .com>
, dated Mon, 12 Jun 2006 18:40:23 remote, seen in
news:comp.lang.javascript, Kam-Hung Soh <ka*********@gmail.com> posted :
Ike wrote:
I'm trying to create a means, in a text field, say, wherein it permits 4
numerics, a dash, two numerics, a dash, two numerics, for, say yyyy-mm-dd.
The dashes should be visible in the text box. I am wondering if there is a
way to do this in javascript. THanks, Ike
Here's a guide by J. R. Stockton: "Javascript Date and Time 4 :
Validation" http://www.merlyn.demon.co.uk/js-date4.htm


AFAICS, it does not cover that aspect, for which js-valid.htm would be
more appropriate.
Keeping the hyphens visible and in position sounds tricky.
It's better to allow anything to be entered, and to check the format
after completion, when the entry can also be checked for validity as a
date.
Sites that
accept date entry usually have a field each for day, month and year. --

DSS.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jun 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Piotr | last post by:
Please help me, I can't solve this problem: I have domain: www.main_domain.com/index.php?userid=23&parametr1=2&parametr2=3 (and other site files like...
2
by: Ginchy | last post by:
I have uploaded a small 3 page web using MS Publisher 2003 and after uploading I switched on url masking to cloak the url. I am certain that it worked fine. I simply changed the colour scheme...
1
by: Suresh | last post by:
Hi, How to set Mask for TextBox component. For example, if a TextBox is intended for Phone Number Data entry, how do we enable it so that user can type using a mask like (999)> 999-9999? ...
1
by: john sutor | last post by:
Is there a way in C# to add masking (for a date format) to a textbox?
0
by: Dana Epp | last post by:
I have a ToolBarButton that when I set it to disabled (button.Enabled = false;) causes a really ugly gray masking effect to take place. This is normal and the intended way of the button, but I...
5
by: grs | last post by:
If you do a maskTextBox.String() the mask characters are still in the string. Surely MS does not want you to store the masking characters - where is the method to remove the masking characters. ...
5
by: pjSoni | last post by:
Hi, I need Javascript text boxt which automatically includes space and character for date when anyone comes text box should looks like 'yyyy-mm-dd'. When pressing each character converting in to...
4
by: Academia | last post by:
I get the following watch message: tsSource.Text.ToUpper() This expression causes side effects and will not be evaluated string The Text is &Edit
9
by: Daniel Smedegaard Buus | last post by:
Hey all :) I was wondering about the $error_types (I particularly notice the 's' suffix when reading the manual) parameter for 'set_error_handler()': Can be used to mask the triggering of the...
2
by: meghla | last post by:
I can not understand how to implement bit masking on a c code?? while working with array it is taking too much time.................. so i need help. i need some suggestion and sample code of C...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.