Question about Sun Java Programming Language (cdj-275)

1 Answer

Validating in jsp

How can i validate values from database(ms-acess). Ex: To check login form

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Mentor:

    An expert who has written 3 tips or uploaded 2 video tips.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 80 Answers

JavaScript Form Validation JavaScript can be used to validate input data in HTML forms before sending off the content to a server.
Form data that typically are checked by a JavaScript could be:

  • has the user left required fields empty?
  • has the user entered a valid e-mail address?
  • has the user entered a valid date?
  • has the user entered text in a numeric field?
Required Fields The function below checks if a required field has been left empty. If the required field is blank, an alert box alerts a message and the function returns false. If a value is entered, the function returns true (means that data is OK):
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
} The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
} function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head> <body>
<form action="submitpage.htm"
onsubmit="return validate_form(this)"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body> </html>
E-mail Validation The function below checks if the content has the general syntax of an email.
This means that the input data must contain at least an @ sign and a dot (.). Also, the @ must not be the first character of the email address, and the last dot must at least be one character after the @ sign:
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
} The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
} function validate_form(thisform)
{
with (thisform)
{
if (validate_email(email,"Not a valid e-mail address!")==false)
{email.focus();return false;}
}
}
</script>
</head> <body>
<form action="submitpage.htm"
onsubmit="return validate_form(this);"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body> </html>


P.S.: If this information was helpful, please rate this solution.

Posted on Mar 13, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Halifax login online


Some internet banking websites only let you log in normally on the computer that you originally set up the account with. There will be a different route on the website when logging in using a different computer. If this IS the same one, it may be that you need to check your email for an email validating link. try also using different browsers.
Good Luck

Feb 03, 2014 | Computers & Internet

Tip

SQL 2008 SA Password Reset


How to reset sa password in SQL Server 2008 when forgot the sa password?

Many time, This problem comes, they have setup SQL 2008 or SQL 2008 R2 for development or QA environment, but they don't know the login sa password by which they can connect to server. In SQL Server 2005, SQL used to fixed group sysadmin with the server role BUILTINAdministrators, that is to say, all local NT administrator automatically add a SQL Server system administrator. But since 2008 Windows BUILTINAdministrators group is not included by default in the sysadmin server role in SQL Server.

So, follow the steps mentioned to reset SQL 2008 password for SA account if no BUILTINAdministrators.

Step 1. Download and install MS SQL Server Password Unlocker.

Step 2. Run MS SQL Server Password Unlocker, click Open, import the master.mdf file. All the user names of your SQL Server will be displayed.

Step 3. Select an SQL account, such as 'SA', click Change Password button.

Step 4. Type a new password, and then click OK.

The new password has been set for your SA account, now you can login
SQL Server with the new password.

Currently SQL Server 2008 still supports two types validation and authentication for access link to resources database, Windows authentication mode and SQL Server and Windows authentication mode which also known as mixed mode. Both of these authentication methods provide access to SQL Server 2008 and its resources.

The Mixed Mode - SQL Server and Windows Authentication Mode

SQL Server and Windows Authentication Mode uses either Active Directory user accounts or SQL Server accounts when validating access to SQL Server. SQL Server 2005 introduces a new way, the policy of the password and account lockout the policy session of SQL Server by using SQL Server implement authentication. SQL Server 2008 also to do so. The policy of SQL Server that can be used include password complexity, password expiration and account lockout. This feature is not available in SQL Server 2000 and becomes a major security risk for most organizations and database administrators. In essence, this weakness has contributed to the Windows authentication set as best practice for the management of authentication in the past. Today, SQL Server and Windows authentication mode may be able to successfully compete with the Windows Authentication Mode.

on Oct 26, 2010 | Computers & Internet

1 Answer

My laptop keeps saying validating identity and it wont go on line troubleshooting says things seemed to be ok but its trying to say a cable is unplugged or my local area connection is firewalled and i


You didn't provide your router make, model, so this is a general procedure. Wired or Wireless connection? You didn't say? Shut down the computer, unplug , remove battery. Unplug the wired/wireless device,. Unplug the ISP modem, remove battery, if applicable. Verify ALL cables and connections. Replace battery in the ISP modem, plug in, wait for selftest. Plug in the wired/wireless device, wait for selftest, If wireless, try a Ethernet cable to verify your router is connecting to the ISP modem. I would suspect a Laptop issue.

Jan 04, 2013 | Computers & Internet

1 Answer

I have a cisco by linksys and i have validating indentity went a enable on seting and my labtop came up but i still have validating identity when i start up lab top status connection will this go away if...


you will have an option called wifi protected setup(wps)...You need to disable this particular feature...
This feature when enabled gives the error message like "validating identity"...

or by the other way instead of disabling the wps, you can add the network manually by entering the network information like ssid, password and security type...
This will also help....

This is a 100% proven solution for validating identity....
Because I directly work for Belkin....

Dec 11, 2010 | Belkin (F5D5231-4) Router

1 Answer

My dell Laditude D610 keeps saying validating identity when i try to connect to my new network.


I had an idea for your "validating identity problem."

Can you get to a dialog box that shows the "Properties" for your wireless networks. What we are looking for is specific for the connection to your wireless network.

We want to get to a page that asks if you want to "Enable IEEE 802.1x authentication for this network." If you disable this (no check mark), does the "validating identity" problem go away?

Let me know if you need more specific help.

Jul 05, 2010 | NetGear Computers & Internet

1 Answer

Dell Inspiron 8600 validating problems


please check the settings of your connection why it need validating the identity. maybe there's a conflict on the configuration.

May 10, 2010 | Computers & Internet

1 Answer

I want to learn that how can i connect my HTML page with my DATABASE created in MS ACCESS so that i can fill my table in HTML page directly-


1. You can use Pages option in MS Access. The page in MS Access is the web page in MS Access which allows you to access database in MS Access database.

2. You can use MS Office Front Page application and use the Form builder and connect your database in that.

3. You can also use Google Apps Business Solution for this however the database will not remain in MS Access but will remain in Docs online.

4. You can use .net application developer for this as well but needs expertise in that.

Mar 09, 2010 | Microsoft Office Standard for PC

1 Answer

Validation code using single loop for multiple fields in javascript


As example, use it:

JavaScript Form ValidationJavaScript can be used to validate input data in HTML forms before sending off the content to a server.
Form data that typically are checked by a JavaScript could be:
  • has the user left required fields empty?
  • has the user entered a valid e-mail address?
  • has the user entered a valid date?
  • has the user entered text in a numeric field?
Required FieldsThe function below checks if a required field has been left empty. If the required field is blank, an alert box alerts a message and the function returns false. If a value is entered, the function returns true (means that data is OK):
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
}The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm"
onsubmit="return validate_form(this)"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body></html>
E-mail ValidationThe function below checks if the content has the general syntax of an email.
This means that the input data must contain at least an @ sign and a dot (.). Also, the @ must not be the first character of the email address, and the last dot must at least be one character after the @ sign:
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
}The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
}function validate_form(thisform)
{
with (thisform)
{
if (validate_email(email,"Not a valid e-mail address!")==false)
{email.focus();return false;}
}
}
</script>
</head><body>
<form action="submitpage.htm"
onsubmit="return validate_form(this);"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>


P.S.: If this information was helpful, please rate this solution.
</body></html>

Mar 04, 2009 | Computers & Internet

3 Answers

Connecting html form to Ms-access data base


If, as I suspect, this is for a web form, then it effectively can't be done on a "proper" web server. This is because you cannot install MS Office on an MS server OS (e.g. Server 2003). You need to use MS SQL Server or MySQL instead. If this is for very limited use (i.e. only a few clients at a time), you can use XP running IIS but this is really not a good idea. The sedurity implications don't bear thinking about :) Linking a web page to Access can probably be done using ASP (never even thought of trying it - anyone else here know for sure?) If you are using a Linux web server then it's totally out of the question. Use Webmin or PHPMySQL to set up a MySQL database & PHP to code the linkage between the page and the DB. There are plenty of tools out there that will automate this for you, some of them Open Source and therefore free to acquire.

Sep 26, 2007 | Microsoft Office Standard for PC

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

669 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18381 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Cosma Papouis
Cosma Papouis

Level 3 Expert

409 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...