Hi,
I have a web form which takes daily sales totals, both counts and monetary
value and is done on a weekly basis, so on a Monday morning the User would
enter these totals. Each total has a range, which at the lower end is >= 0
and the upper limit is configurable, these totals are then submitted to a
web service which posts them to a data store.
The question is regarding validation, obviously I can validate on the web
form using RangeValidator, and I was thinking of using an event to track
which control had focus and then modify the ControlToValida te accordingly.
So my first question would be how do you track on a web form which control
has focus using an event?
However perhaps a broader question would be: surely it would be better to
simply submit the whole object which holds the totals, and return any error
message, to the erring control, however that gets complicated if there is
more than one error, this would involve the whole object to-ing and fro-ing
between the web service and the web form?
Any thoughts anyone?
Many thanks
Colin 1 1622
1. You just create a RangeValidator for each control you want to
validate on
your webform. Why do you want to share one RangeValidator control?
2. There is a validation summary control that will display all error
messages
of all the validation control on the client side.
Could you explain your process flow further in detail? It seems that
you could just do #1 and #2, and if it is successful, then your
webform that submit the the data to the web service.
Tommy,
"Colin Basterfield" <co************ **@hotmail.com> wrote in message news:<O0******* *******@TK2MSFT NGP09.phx.gbl>. .. Hi,
I have a web form which takes daily sales totals, both counts and monetary value and is done on a weekly basis, so on a Monday morning the User would enter these totals. Each total has a range, which at the lower end is >= 0 and the upper limit is configurable, these totals are then submitted to a web service which posts them to a data store.
The question is regarding validation, obviously I can validate on the web form using RangeValidator, and I was thinking of using an event to track which control had focus and then modify the ControlToValida te accordingly. So my first question would be how do you track on a web form which control has focus using an event?
However perhaps a broader question would be: surely it would be better to simply submit the whole object which holds the totals, and return any error message, to the erring control, however that gets complicated if there is more than one error, this would involve the whole object to-ing and fro-ing between the web service and the web form?
Any thoughts anyone? Many thanks Colin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Weston C |
last post by:
I'm trying to write a generic/reusable form validator in Javascript...
just something that checks to make sure required fields have a value. By
generic I mean I don't want to explicitly reference the name/id of the
form or the name of any of the data fields within a "validation"
function.
My first shot seems to have some errors in it:
FieldsToValidateByForm = {};
FieldsToValidateByForm = ;
|
by: Stephen Poley |
last post by:
I have quite often (as have probably many of you) come across HTML forms
with irritating bits of Javascript attached. The last straw on this
particular camel's back was a large form I was asked to complete in
connection with attendance at a seminar. After spending more than 15
minutes on it, I clicked on the submit button - and nothing happened.
Looking round the pages on Javascript form validation that Google
produced for me (well,...
|
by: TJS |
last post by:
how do I get "onSubmit" to work in .net ?
<Form id="Form1" name="Form1" method="post" onSubmit="return
validateStandard(this, 'error');" runat="server">
|
by: Dave Wurtz |
last post by:
All,
Not sure if I'm taking the correct approach or not, but here it is...
I have my business object with a property. I want to validate the Setting
of this property with the business object. This works fine. I then create
a Form, put a TextBox control on it, add a DataBinding to the control to the
business object's property. When the control is displayed, it sets the text
to the property's get - perfect. When I type something in...
|
by: julie.siebel |
last post by:
Hello all!
As embarrassing as it is to admit this, I've been designing db driven
websites using javascript and vbscript for about 6-7 years now, and I
am *horrible* at form validation.
To be honest I usually hire someone to do it for me, grab predone
scripts and kind of hack out the parts that I need, or just do very
minimal validation (e.g. this is numeric, this is alpha-numeric, etc.)
| |
by: this one |
last post by:
I have the following code
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="..\include\gen_validatorv2.js"
type="text/javascript"></script>
</head>
|
by: Chris |
last post by:
Hi,
I have a form for uploading documents and inserting the data into a mysql
db. I would like to validate the form. I have tried a couple of Javascript
form validation functions, but it appears that the data goes straight to the
processing page, rather than the javascript seeing if data is missing and
popping up an alert. I thought it may be because much of the form is
populated with data from the db (lists, etc.), but when I leave...
|
by: Rik |
last post by:
Hello guys,
now that I'm that I'm working on my first major 'open' forms (with
uncontrolled users I mean, not a secure backend-interface), I'd like to add
a lot of possibilities to check wether certain fields match certain
criteria, and inform the user in different ways when the data is wrong
(offcourse, this will be checked on posting the data again, but that's
something I've got a lot of experience with).
Now, offcourse it's...
|
by: ak1dnar |
last post by:
Hi, I got this scripts from this URL
There is Error when i submit the form.
Line: 54
Error: 'document.getElementbyID(....)' is null or not an object
What is this error.
Complete Files
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |