.NET Framework - in EW 3 make form fields mandatory
Asked By gjb
09-Mar-10 11:23 AM
I am using EW 3
Hosting company has Windows server with FrontPage extensions
Everything works fine so far. I have a need to to make several fields in a
form (the project I am working on has lots of forms) required. Back in the
days of FrontPage it was simple to make a field required. I cannot seam to
find that function in EW 3. Is there a SIMPLE way to make a few fields
mandatory before submitting?
--------------------
gjb
SQL Express
(1)
ASP.NET
(1)
VWDExpress
(1)
SQLExpess
(1)
PHPHow
(1)
Wizards
(1)
Windows
(1)
Bots
(1)
Andrew Murray replied to gjb
You would need to write the javascript (or server-side script) to accomplish
this, or implement a pre-existing code (available on the web).
Finding an example of what you want to do is easy; search in your favourite
search engine.
I found this one,
http://tetlaw.id.au/view/javascript/really-easy-field-validation with a
Google search on "simple form field validation"
There is a little work to implement it, but will do what you want, and more,
so as you have said you have lots of forms on your projects, the other
'validation' methods that the scripts in the above site feature may come in
handy.
Clark replied to gjb
It couldnt be simpler if your host supports asp.net. You just use the
Validation Controls that come with Expression.
--
Clark, A.K.A. HomePage Doctor
www.HomePageDoctor.com/Tutorials.htm
www.Ownertrades.com Created with Frontpage, Access, Wizards & Bots
www.MyNumbersTracker.com Created with Expression, VWDExpress, SQLExpess,
ASP.NET
www.mynumberstracker.com Created with Expression, VWDExpress, SQL Express,
ASP.NET
-------------------------------------------------------------------------------------------------
KathyW replied to Clark
Clark, the OP is talking about an HTML form.
Clark replied to KathyW
Yes. I know. But he asked for simple, so I gave him simple. He didnt say
his host couldnt support asp.net.
--
Clark, A.K.A. HomePage Doctor
www.HomePageDoctor.com/Tutorials.htm
www.Ownertrades.com Created with Frontpage, Access, Wizards & Bots
www.MyNumbersTracker.com Created with Expression, VWDExpress, SQLExpess,
ASP.NET
www.mynumberstracker.com Created with Expression, VWDExpress, SQL Express,
ASP.NET
-------------------------------------------------------------------------------------------------
Hot-text replied to gjb

Are You Looking for this Old Microsoft FrontPage 3.0 SIMPLE !
var b = 0 ;
var i = 0 ;
var errmsg = "" ;
var punct = "" ;
var min = 0 ;
var max = 0 ;
function form-1_email(field) {
if (b && (field.value.length == 0)) return true ;
if (! emailCheck(field.value))
{
field.focus();
if (field.type == "text") field.select();
return false ;
}
return true ;
}
function form-1_filledin(field) {
if (b && (field.value.length == 0)) return true;
if (field.value.length < min) {
alert(errmsg);
field.focus();
if (field.type == "text") field.select();
return false ;
}
if ((max > 0) && (field.value.length > max)) {
alert(errmsg);
field.focus();
if (field.type == "text") field.select();
return false ;
}
return true ;
}
function form-1_number(field) {
if (b && (field.value.length == 0)) return true ; ;
if (i)
var valid = "0123456789"
else
var valid = ".,0123456789"
var pass = 1;
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") pass = 0;
}
if (!pass) {
alert(errmsg);
field.focus();
if (field.type == "text") field.select();
return false;
}
if (field.value < min) {
alert(errmsg);
field.focus();
if (field.type == "text") field.select();
return false;
}
if ((max > 0) && (field.value > max)) {
alert(errmsg);
field.focus();
if (field.type == "text") field.select();
return false;
}
return true ;
}
function form-1_numseq(field) {
Hot-text replied to Clark
Clark @ASP.NET
We @PHP
How do you Mr. Clark make them work Hand in Hand!
gjb replied to gjb
Thanks everyone. I found this and extremly simple to use:
http://javascript.internet.com/forms/basic-validation.html?requiredname=erearyer&requiredemail=aerertert&requiredhobby=1&requiredcomments=aeraetert
--
--------------------
g
Hot-text replied to gjb
Good Job gjb!
if we need help we look for you first!
and for FrontPage extensions fill free come by
microsoft.public.frontpage.client
ASP.NET Configuration Tool - cannot find server .NET Framework I am trying to add users to the default ASP.NET membership provider (SQL Express) using the ASP.NET Configuration Tool. When I launch the ASP.NET Configuration Tool from the Web Site menu
ASP.NET .NET Framework Need to learn asp.net. Want to have multiple users with individual id's / passwords sign in to view pages. Already downloaded visual web developer express & visual studio 2008. (visual studio. . . 90 day trial). I started looking at microsoft asp.net site, www asp.net. Any suggestions? Expression Web Designer Discussions ASP.NET (1) ASP (1) SQL Server (1
SQL Server 2000 vs SQL Server Express .NET Framework I have an ASP.Net website that was developed using SQL Server 2000. I want to 'port' it to use SQL Server Express, since I don't have SQL Server 2000 (besides my db is less than 1GB
Large MySQL SQL File -> ASP.NET Database .NET Framework , ASP.NET, Database" / > Greetings, I have backed up a MySQL database from a PHP site. This backup is in the form of a large (55MB) SQL file. Can anyone tell me how I can convert it to an ASP.NET database? The file is too large for cut and paste and it appears the SQL
user.config files available in asp.net? .NET Framework i want to use these but think they may be only windows forms ASP.NET Discussions ASP.NET (1) Database (1) Online (1) Llibre (1) Managednewsgroups (1) Windows (1) Winform (1) Español (1 No, they are not. Any configuration settings for asp.net apps should be placed in web.config. There's options for using configuration settings in