Validation forms
Hi, i started to work with Sap netweaver visual composer. i have to validate a "input field" where it only have to accept letters like 'Abraham cuahutle' but not 'Abraham00939383%6$ Cu398403' somebody can help me.
Abraham,
There is no such a method to check the availability of numbers and special characters in input field. You can make it as possible by checking for individual numbers and also for special characters.
Use the step I've given for numbers also for the special characters.
For example,
Condition='Contains' Value = '%' Msg='No special characters'
Condition='Contains' Value = '@' Msg='No special characters'
Regards
Basheer
Similar Messages
-
I have just been looking at the Spry validation form objects
like the textfileds and the checkboxes etc, and I like what I see,
but I wandered how I might deal with them once filled in and the
form is submitted.
Currently, I create forms manually and then use the Yaromat
Validate form which I think is really good. I create asp pages, so
I programme my email forms to be submitted by CDONTS. Once the form
is submitted it is then sent to a thank you page where the CDONTS
code is sitting, and is formatted into an email and sent to the
relevant email addresses.
If I chose to use Spry validation instead of the Yaromat
Check form, do I just carry on creating the CDONTS code on the
thank you page as I would do normally in order for the email to be
sent?
Thanks
MatYou can specify addional error locations. See this example: http://labs.adobe.com/technologies/spry/samples/validationwidgets/Single_error_message_onS ubmit.html
-
In Service contract, to change the valid form date on service code level.
Hi.
I want to change the price valid form date on service code level ( i.e. in condition) in Service contract.
I know i can do that with ME32 transaction but i have lot of Service contract with more then 10,000 line items
Is there any way that i can change in mass based on Service contract no. wise.???
Thanks in advance..
Edited by: VIKRANT HANDE on Sep 15, 2009 9:11 AMPlease check in KON* series table in SE16N transaction. I guess KOHN table may help you out. You can see other similar tables.
In any one of the table you will find validity data. -
Validating forms in jsp using javaScript
Hi all i'm trying to validate this form with javeScript. i was testing it with just the <input type=text name= file> first. it works but after the alert message it still posts to writeXML......
i tried putting the fuction valid() after the <form> tag but it still posts it to writeXML.jsp.......can anyone help me please........What i want to do is make sure that something is typed in all the forms befor posting to writeXML..Thanx
<html>
<head> <title>Create MultipleChoice Questions</title> </head>
<script language="JavaScript">
function valid(form) {
if(form.file.value == "")
alert("Please enter the file name")
</script>
<body bgcolor="#cccccc">
<% int count = 0;
String number = request.getParameter("nOfq");
int qNumber = Integer.parseInt(number); %>
<form action="writeXML.jsp" method="POST">
<center>
<table bgcolor="silver" border="1" width="75%">
<tr align="center"><td><b>Type in the Name of your Questionnaire here eg. BlackHistory. Dont leave any spaces between letters</b><br>
<textarea name="file" rows="1" cols="25"></textarea><br>
</td></tr>
<% for(int i=1;i<qNumber+1; i++) { %>
<%count++;%>
<tr align="center" bgcolor="#336699"><td><b>QUESTION <%= count %>: </b><br>
</td></tr>
<tr align="center"><td><b>ENTER QUESTION:</b><br>
<textarea name=<%="questionText"+i%> rows="5" cols="65"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 1:</b><br>
<textarea name=<%="choice_1"+i%> rows="2" cols="50"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 2:</b><br>
<textarea name=<%="choice_2"+i%> rows="2" cols="50"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 3:</b><br>
<textarea name=<%="choice_3"+i%> rows="2" cols="50"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 4:</b><br>
<textarea name=<%="choice_4"+i%> rows="2" cols="50"></textarea><br><br><br>
</td></tr>
<tr align="center" bgcolor="#679995"><td><b>CORRECT ANSWER:</b><br>
<textarea name=<%="cAnswer"+i%> rows="2" cols="50"></textarea><br><br><br>
</td></tr>
<% } %>
<tr>
<td align="center"><input type="submit" name="next" value="NEXTT" onClick="valid(this.form)">
<td align="center"><input type="hidden" name="qCount" value="<%=count+1%>">
</td></tr>
</table>
</center>
</form>
</body>
</html>this Corrected code works perfectly
<html>
<head> <title>Create MultipleChoice Questions</title> </head>
<script language="JavaScript">
function valid(form) {
if(form.file.value == ""){
alert("Please enter the file name");
frmValid.file.focus();
}else{
frmValid.action="writeXML.jsp";
frmValid.submit();
</script>
<body bgcolor="#cccccc">
<% int count = 0;
int qNumber=-1;
String number = clearNull(request.getParameter("nOfq"));
if(! number.equals(""))
qNumber = Integer.parseInt(number);
%>
<form name="frmValid" method="POST" >
<center>
<table bgcolor="silver" border="1" width="75%">
<tr align="center"><td><b>Type in the Name of your Questionnaire here eg. BlackHistory. Dont leave any spaces between letters</b><br>
<textarea name="file" rows="1" cols="25"></textarea><br>
</td></tr>
<% for(int i=1;i<qNumber+1; i++) { %>
<%count++;%>
<tr align="center" bgcolor="#336699"><td><b>QUESTION <%= count %>: </b><br>
</td></tr>
<tr align="center"><td><b>ENTER QUESTION:</b><br>
<textarea name=<%="questionText"+i%> rows="5" cols="65"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 1:</b><br>
<textarea name=<%="choice_1"+i%> rows="2" cols="50"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 2:</b><br>
<textarea name=<%="choice_2"+i%> rows="2" cols="50"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 3:</b><br>
<textarea name=<%="choice_3"+i%> rows="2" cols="50"></textarea><br>
</td></tr>
<tr align="center"><td><b>CHOICE 4:</b><br>
<textarea name=<%="choice_4"+i%> rows="2" cols="50"></textarea><br><br><br>
</td></tr>
<tr align="center" bgcolor="#679995"><td><b>CORRECT ANSWER:</b><br>
<textarea name=<%="cAnswer"+i%> rows="2" cols="50"></textarea><br><br><br>
</td></tr>
<% } %>
<tr>
<td align="center"><input type="submit" name="next" value="NEXTT" onClick="valid(this.form)">
<td align="center"><input type="hidden" name="qCount" value="<%=count+1%>">
</td></tr>
</table>
</center>
</form>
</body>
</html>
<%!
private String clearNull( String sField ) {
return ( sField == null ) ? "" : sField;
%> -
How does Validated Form tag insert the error message?
I'm using validated forms tags in my jsp and when there is an error in the form
the error message is set to display on top of the wrong field. This is an attribute
that I set in the <portlet:validatedForm> tag called "messageAlign", but I want
to know how this is inserted or what I can do to line it up above the text field
because it is moving all the elemnts around in the table cell. Any insight would
be helpful.
Thanks,
TravisHard to know what the cause is because it's like this
I know what I did to cause this. I upgraded my one of my hard drives, renamed the drive and moved the folder. The missing pictures it can't find were added with the option in the advance menu "copy photo to library" turned off.
and this
What I did is added a small SSD as my primary drive. Put the OS and all the apps on it. Moved my iPhoto and iTunes libraries to an large external. Most of the picture it is not having a problem wth. Only certain ones. Don't actually think I unchecked tha prefeence, but it's acting like i have.
seem to be written by two different people.
This thread
https://discussions.apple.com/thread/3216539?tstart=30
has details on how one user hacked the SQL database to fix the issue. Not for the faint hearted. Back up first.
Regards
TD -
How to iterate dyna validation form using jstl tag
i have create dyna validation form in struts-config.xml
<form-bean name="DynaValidationForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String" />
<form-property name="cityName" type="java.lang.String[]" />
<form-bean>
and i want to disply these value on my jsp by usig jstl tag
<c:forEach var="form" item="${DynaValidatorForm.????????}">
<c:out value="form.username">
</c:forEach>
but problem is item is of collection object And in dyna validation form
how can i create the collection object or to call this .
please help meposting the same question more than once won't
increase your chances of getting an answer.
sometimes nobody knows or no one is interested in
putting in the time to figure out an answer. your
question might be one of those.
%sometimes I get the feeling that I'm actually helping someone do me out of a job. -
HT1918 ? Valid forms of payment for iTunes in Kenya?
I live in Kenya - iTunes will not accept my KCB debit card as a valid form of payment. I am using the same card successfully on Amazon, so why wont iTunes accept it?
Lulu Clark wrote:
...... are you saying that it is not a valid form of payment for iTunes?
Correct.
The context of this thread implies iTunes. -
Hi guys! In my project i need to submit a whole form but validate only part of it. I`m planning to develop partial validation form, custom button for the form, and validation zone (envelopes the components that will be validated). I`ll use the following example:
http://forum.java.sun.com/thread.jspa?forumID=427&threadID=643655
Any suggestions/discussions are welcome.As it signalled the page of Youtube, expected this answer, but like my knowledge in this matter is scarce, had to ensure me that the problem was not the browser or the absence of a package.
Thank you for answering -
Error While validating Form 24Q
Dear Experts.
We have implemented the note-2003817 (Dependent Note - 1886576) for the validation error ""T-FV-4064. Invalid Salary Details Record length" . The Note has been implemented successfully, but after implementing, we got the another error " T-FV-4023 'Income chargeable under the head Salaries (332-333)' not equal to difference of 'Total Salary 332' - 'Gross Total of 'Total Deduction under section 16' under associated Salary Details-Section 16 Detail'" for all the employees.
Can anybody please suggest any notes released recently by SAP for the above issue.
The FVU Version used : 4.2 (TIN-NSDL)
It is very urgent as this should be filed within a week..
Please help me out.
Thanks
SAP JOYHi,
Here is a suggestion, if you are on ECC 6, the form HR_IN_TAXF16NX_P and HR_IN_TAXF16000Y are not delivered. You need to copy it from client 000. Check if these forms are present in your client.
I had the same problem with ECC 6, when the forms were copied from 000, the error was rectified.
Hope it helps. -
Hi All,
I am using Flash 8;ActionScript 2.0.
I have a form with serveral input fields. I want to validate
these fields. For example make sure the email input is in the
correct format, that the telephone input has only numbers, etc.
All of the tutorials I have looked at attach the AS to the
submit button. I do not want to do this. What I'd like to set up is
have AS check the input field entry to make sure it's correct PRIOR
to the submission of the form.
Is this possible?
This is the AS for the form with no validation:
tl = this;
initF();
stop();
//Tabs
nameTF.tabIndex = 1
emailTF.tabIndex = 2
companyTF.tabIndex = 3
phoneTF.tabIndex = 4
messageTF.tabIndex = 5
//End Tabs
sendBtn.onRelease = function() {
if (checkFormF()) {
sendEmailF();
} else {
tl.gotoAndStop("errorFrame");
function checkFormF():Boolean {
if (nameTF.text == "Name" || companyTF.text == "Company" ||
emailTF.text == "E-mail" || phoneTF.text == "Phone" ||
messageTF.text == "Message" || nameTF.text == "" || companyTF.text
== "" || emailTF.text == "" || phoneTF.text == "" || messageTF.text
== "") {
return false;
} else {
return true;
function sendEmailF() {
sendLV = new LoadVars();
receiveLV = new LoadVars();
receiveLV.onLoad = function(s) {
if (s) {
tl.gotoAndStop("thankyouFrame");
sendLV.name1 = nameTF.text;
sendLV.email = emailTF.text;
sendLV.message1 = messageTF.text;
sendLV.phone = phoneTF.text;
sendLV.company = companyTF.text;
sendLV.sendAndLoad("mailer5.php",receiveLV,"POST");
function initF() {
nameTF.text = "Name";
companyTF.text = "Company";
emailTF.text = "E-mail";
phoneTF.text = "Phone";
messageTF.text = "Message";
label_01 = "Name";
label_02 = "Email";
label_03 = "Company";
label_04 = "Phone";
label_05 = "Message";
nameTF.text = label_01;
emailTF.text = label_02;
companyTF.text = label_03;
phoneTF.text = label_04;
messageTF.text = label_05;
this.onEnterFrame = function() {
nameTF.onSetFocus = function() {
if (nameTF.text == label_01) {
nameTF.text = "";
nameTF.onKillFocus = function() {
if (nameTF.text == "") {
nameTF.text = label_01;
emailTF.onSetFocus = function() {
if (emailTF.text == label_02) {
emailTF.text = "";
emailTF.onKillFocus = function() {
if (emailTF.text == "") {
emailTF.text = label_02;
companyTF.onSetFocus = function() {
if (companyTF.text == label_03) {
companyTF.text = "";
companyTF.onKillFocus = function() {
if (companyTF.text == "") {
companyTF.text = label_03;
phoneTF.onSetFocus = function() {
if (phoneTF.text == label_04) {
phoneTF.text = "";
phoneTF.onKillFocus = function() {
if (phoneTF.text == "") {
phoneTF.text = label_04;
messageTF.onSetFocus = function() {
if (messageTF.text == label_05) {
messageTF.text = "";
messageTF.onKillFocus = function() {
if (messageTF.text == "") {
messageTF.text = label_05;
Your help is much appreciated,
ScottI don't have a solution for you. The reason that the existing
solutions that you've found use the submit event is quite simple.
It's the least intrusive place to check for errors. You have a
limited number of events where you can place this content checking
code. If you wanted to test the email address that the user entered
after that entry was made, how would you do that? You can tell when
the user gives focus to the textfield, you can tell when the user
enters a character, you can tell when the textfield loses focus.
None of these events is really appropriate for testing the content.
What is the problem with waiting until the submit button is
used? -
Hi
I'm developing an application using struts and my web server is tomcat 4. i have a add page with different fields. How do i validtate these fields in struts. The following are my entries
struts-config.xml:
<action path="/AddOpportunitiesAction"
type="com.wipro.opportunity.ui.AddOpportunitiesAction"
name="AddOpportunitiesForm"
scope="request"
parameter="action"
validate="true"
input="AddOpportunitiesAction">
<forward name="addOpportunity" path="/addOpportunity.jsp"/>
<forward name="DisplayOpportunitiesAction" path="/DisplayOpportunitiesAction.do"/>
<forward name="DisplayAccountAction" path="/DisplayAccountAction.do"/>
</action>
i have extended addopportunityForm as ValidatorForm. i have given the rules in vaidator.xml as
<form name="AddOpportunitiesForm">
<field property="opportunityName"
depends="required">
<arg0 key="addopportunity.name"/>
</field>
</form>
The following entry show the getter setter method in addopportunityForm
public final class AddOpportunitiesForm extends ValidatorForm{
private String opportunity_name;
public void setOpportunityName(String name) {
this.opportunity_name = name;
public String getOpportunityName() {
return this.opportunity_name;
Note: IN addopportunity.jsp the property of my name field is opporutniyName and not opportunity_name
addopportunity.jsp
<td>
Opp. Name <font color="red"> * </font>
</td>
<td>
<html:text name="AddOpportunitiesForm" property="opportunityName"/>
RESULT: I'm not able to validate the field
Pls help me out.
mail me at [email protected]
Regards
RafiqHere is my code below.
my serverside validation is working fine but my client side validation doesnt work.
Struts config:
<form-bean name="courseCriteriaForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="paperId" type="java.lang.Integer"/>
<form-property name="passingMarks" type="java.lang.Integer"/>
<form-property name="totalMarks" type="java.lang.Integer"/>
<form-property name="StudentListmarks" type="org.aptech.lms.common.StudentListMarks[]"/>
</form-bean>
<action
path="/displayCourseDetail"
name ="courseCriteriaForm"
scope = "session"
type="org.aptech.lms.admin.action.DisplayCourseMarksDetailAction"
validate="false"
input="/pages/admin/CourseMarksDetail.jsp">
<forward name="success" path="/pages/admin/CourseMarksDetail.jsp" />
<forward name="error" path="/pages/admin/CourseMarksDetail.jsp" />
</action>
<action
path="/updateCourseMarks"
scope = "session"
name ="courseCriteriaForm"
type="org.aptech.lms.admin.action.UpdateCourseMarksAction"
validate="true"
input="/pages/admin/CourseMarksDetail.jsp">
<forward name="success" path="/pages/admin/CourseMarksUpdateSuccess.jsp"/>
<forward name="cancel" path="/showUserRoles.do"/>
<forward name="error" path="/pages/admin/CourseMarksDetail.jsp"/>
<forward name="noerror" path="/pages/admin/MarksFail.jsp"/>
</action>
MY JSP
<html:form action="/updateCourseMarks" onsubmit="return validateCourseCriteriaForm(this);" >
<html:javascript formName="courseCriteriaForm"/>
<table class="tableborder">
<tr class="subtablerow2"><td class="boldtext">Total Marks : <bean:write name="courseCriteriaForm" property="totalMarks"/> </td>
<td class="boldtext">Passing Marks : <bean:write name="courseCriteriaForm"property="passingMarks"/></td>
</tr>
</table>
<table class="tableborder">
<html:hidden name="courseCriteriaForm" property="totalMarks" />
<logic:iterate id="StudentListmarks" name="courseCriteriaForm" property="StudentListmarks" >
<tr>
<td>
<bean:write name="StudentListmarks" property="userinfo_id"/>
</td>
<td>
<bean:write name="StudentListmarks" property="firstname"/>
</td>
<td>
<bean:write name="StudentListmarks" property="lastname"/>
</td>
<td>
<c:if test="${StudentListmarks.marks == '-99'}">
<html:text name="StudentListmarks" property="marks" indexed="true" value="NA" />
</c:if>
<c:if test="${StudentListmarks.marks != '-99'}">
<html:text name="StudentListmarks" property="marks" indexed="true" />
</c:if>
</td>
<td>
<html:text name="StudentListmarks" property="remarks" indexed="true"/>
</td>
</tr>
</logic:iterate>
</table>
<logic:present name="display" scope="session">
<div align="center"><html:submit styleClass="button"/><html:cancel styleClass="button" /></div>
</logic:present>
</html:form>
MY VALIDATION.XML
<form name="courseCriteriaForm">
<field property="marks" indexedListProperty="StudentListmarks" depends="required,mask">
<arg0 key="errors.marks.required11"/>
<arg1 key="errors.marks.mask"/>
<!-- <arg2 key="CourseCriteriaForm.totalMarks" name="totalMarks"/>-->
<!--<arg3 key="errors.validatemarks" name="validatemarks"/>-->
<var><var-name>mask</var-name>
<var-value>^[NA0-9]{2}[a-zA-Z0-9_ ]*$</var-value>
</var>
<!--<var>
<var-name>secondMark</var-name>
<var-value>totalMarks</var-value>
</var>-->
</field>
<!--<field property="totalMarks" depends="validatemarks"/>-->
</form>
could u please tell me why my client side validation doest happen -
Validation Form - User Availability
I am doing a user registration UI for a web project. Our
database has usernames unique. I dont want the user to create an
account, submit form, then come back and see they have an error:
username is already taken. I would like to put a button next to the
username input field called Check. This button i want it to check
the username availability. I have a php function that returns true
or false depending on the username check. I want this to be a
validation widget to my input field. Can this be done using spry
1.6? If, yes could you point out some hints?Hi,
you can achieve this behavior by using Spry sending the
username when the Check button is pressed and receiving as response
the xml with the existent usernames. Your custom function will
submit the form via XHR. The callback function will interpret the
response from the server.
You can see an example on this
page.
Also you should consider a security issue if you return the
xml containing the usernames, because it will be available for all
Diana -
Include type scripts for validating forms
hello,
I'm new to AIF, but to internet development. here is my question.
I have a template of a form that our HR department use in 94 different variations.
I will use the AIF with the form and data merging to be presented to the end-user. they will have the ability to fill online or download with fill option.
My concern is the client side validation for each form variation. Is there a way to include a client side script file to eliminate an unique form for each variation or having the specific script in each form.my guess- the recipient email address is using spam assassin
or a similar
filter. It's seeing the default first line of the email and
giving it two
points on it's rating system thinking it's the old matt
wright formmail 1.6
script.
the fix- if it's a script you installed and can touch and
modify, is to edit
the script so it's got a different first line in the body of
the email.
If it's a host installed system wide script you can't touch-
install your
own like nms-formmail or phpformmail (and edit the first line
of the
outgoing email's body text)
This is the line to search for in the script:
Below is the result of your feedback form. It was submitted
by
change it to something else. Watch out for any characters you
might need to
escape in that scripting language like ' when making the
edit.
further sluthing- ask the client to send you the full source
of the incoming
email, or the email that's been sent to their spam box so you
can see the
email headers. Spam Assassin put it's scores in the header
and you can see
why it's been trashed.
> interesting read, but my problem is different. The
results of the form are
> being flagged as spam by the people receiving.
Alan
Adobe Community Expert, dreamweaver
http://www.adobe.com/communities/experts/ -
Related to struts validation form
Hi all,
When entering validations on a form in validation.xml, If you have a
fieldA with "depends=required,maxlength" and FieldB with "depends=required,email".
If when i give fieldA with 40characters but its permitted length is 20 and FieldB is empty. Now when i click submit button it shows the error only for fieldB.
When i give a correct email id in fieldB then FieldA error for max length is triggered..
Is there a way for both to appear at the same time when the
Submit button is first clicked?You may have more luck if you ask this in a forum devoted to Struts. There's one at their own homepage over there at apache.org.
-
Hi,
i try to validate my form (items in them) with functions wich returns 1 or 0.
Here is one of the function:
create or replace
function firmennamecheck( p_firmenname IN VARCHAR2
) return NUMBER
as
l_firmenname VARCHAR2(255);
BEGIN
l_firmenname := p_firmenname;
IF regexp_like(l_firmenname, '^[[:alnum:][:space:]]{2,80}$') OR l_firmenname IS NULL THEN
RETURN 1;
ELSE
RETURN 0;
END IF;
end firmennamecheck; My problem is the whitespace. If I give an input of one whitespace in the text field, they returns 0 (this is ok!),
but if I insert more then one whitespaces in the text field, they also say, its ok!
Example:
' ' = no error message. (a big problem for mandatory items!)
'XYZ Inc' = no error message (how I want it!)
If I Use this expression:^[[:alnum:]]{2,80}$ then it's not more possible to insert text like 'XYZ Inc', because there is a whitespace.Hi David,
so this is a form where user can register on my website. In this case it is a "dealer". They give information about comanpy name, first name, last name.....
And I want to validate this form.
Company name is "Name Ihrer Firma" and could contain numbers and letters.
In this case I use this Exp. '^[[:alnum:][:space:]]{2,80}$'.
Now its possible to type in letters and numbers also whitespace characters.
But the problem are the whitespace characters!
The user can type in a company name like " ". Just full of whitespaces! and the validation says "its okay!" and submit the page and the data gets inserted in the user table.
Result Example:
select * from user: shows me the user with a company name full of whitespace charactes!
Requirements:
1. Numbers, Letters and Whitespace charecters are allowed
2. Whitespaces not at the begin of the textfield
3. Only typing whitespaces without letters are not allowed!
David Gale I try your code, but its not working on the first time :-/
I think You forgot some [] more.
The finish reg. '^[[:alnum:]]{4,40}([[:space:][:alnum:]]{1,40})*$'But somethink works not fine. maximal 40 characters are allowed. I test it and type more then 40 characters in, sumbit it and without an error messages. :-/ this means, that the reg. is not 100% right! but whats wrong in the code?
Edited by: Mr.Nedo on 06.04.2011 05:56 -
ok. So I have these boxes-
First Name
Last Name
E-Mail
Username
Password
Re-Type Password
I also have a register button.
I have properly linked my javascript and checked for any
mistakes but when I click the register button, I get an error
saying that I am missing parts of my form where I want an alert box
to come up instead.
Attached is my Javascript.What does the error message say, exactly. And can we see the
HTML?
By the way,
> errorMessage += "Please enter less letters.\n";
wouldn't you want to say "Please enter fewer letters.\n"?
> errorMessage += "Please choose select a button.\n";
I have no idea what this says....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Night_Watch" <[email protected]> wrote in
message
news:[email protected]...
> ok. So I have these boxes-
> First Name
> Last Name
> E-Mail
> Username
> Password
> Re-Type Password
>
> I also have a register button.
>
> I have properly linked my javascript and checked for any
mistakes but when
> I
> click the register button, I get an error saying that I
am missing parts
> of my
> form where I want an alert box to come up instead.
>
> Attached is my Javascript.
>
> // JavaScript Document
>
> // ---------------------- Form
> Validation ---------------------------------
> // this file will work with registration.html
>
> function validate(){
> /*this runs when the user clicks the submit button*/
> /* VARIABLES START
> var valid = true;
> var errorMessage="";
> var minLength = 3;
> var maxLength = 9;
> /*VARIABLES END-----------------------*/
>
> /* FIRST NAME START---------------*/
> var
firstName=document.getElementById("firstname").value;
> if(firstName.length < minLength){
> valid = false;
> errorMessage += "Please enter more letters.\n";
> }
> if(firstName.Length > maxLength){
> valid = false;
> errorMessage += "Please enter less letters.\n";
> }
>
> /*FIRST NAME END------------------------*/
>
> /*LAST NAME ENDS--------------------------*/
>
> var lastName=document.getElementById("lastname").value;
> if(lastName.length < minLength){
> valid = false;
> errorMessage += "Please enter more letters.\n";
> }
> if(lastName.Length > maxLength){
> valid = false;
> errorMessage += "Please enter more letters!.\n";
> }
>
> /*LAST NAME ENDS-------------------------------*/
>
> /*RADIO BUTTONS START--------------------------*/
> var format = document.myForm.format; /*this will target
the two radio
> buttons*/
> /*the variable format will actually be an array
> alert(format.length);
> alert(format[0].value);
> alert(format[1].value);*/
>
> if(format[0].checked==false &&
format[1].checked==false){
> valid = false;
> errorMessage += "Please choose select a button.\n";
> }
>
>
>
> /*RADIO BUTTONS END---------------------------*/
>
> /*CHECK PASSWORD FOR NUMBERS & LETTERS
START--------------*/
> var hasLetters = false;
> var hasNum = false;
> var passCheck =
document.getElementById("password").value;
>
>
> for(i=0; i < passCheck.length; i++){
> /*look at each letter and character ... one at a time*/
> var letter = passCheck.substr(i,1);
> if ( isNaN(letter)){
> /*isNaN checks to see if the letter is not a number*/
> /*when this is false it means we have a letter*/
>
> hasLetters = true;
> /*alert("password requires numbers and letters.");*/
> } else {
> hasNum = true;
> }
> }
>
> if (hasNum !=true){
> errorMessage += "-.-"\n"
> }
>
> if ( valid == false ){
> alert(errorMessage);
>
> }
> }
>
Maybe you are looking for
-
Set Properties Information in the Filesystem
Hi, I am working on a program, that is reading the properties of the files in my Windows NT Fillsystem return them and save the chosen attributes in a array. I�m acutally doing this in JavaScript with the command "GetDetailsOf()". Thats works very fi
-
Network Activities update issue after confirmation
Dear, In our PS projects we are using one network header (with backwards scheduling) with both internal (PS01) en cost activities (PS03). The cost activities are linked to two internal activities to establish a cost spread. For example Cost activity
-
Gather Table Statistics (Stats) Crashing Application
Hello Just started a new place of work which has a 9i database with a VB Front End App. Noticed in the Database no stats had been gathered for any objects (ever). I decided to run a gather stats procedure on a particular heavily-used table but it cau
-
Best FS for 500X5GB hardware RAID5?
I would like to hear your thoughts on this. I have a 500x5GB RAID5 array currently formatted with NTFS (from Windows), and I'm currently moving all of the data over to another RAID0 partition in order to allow me to delete the partition and reformat
-
IPhoto does not recognize old backup of library
I have a iPhoto library backup disk (dvd) that dates back to 2006. Iphoto does not recognize the photos and they will not open. How do I get to see the photo's? Iphoto 11 iMac 2.4 ghz intel core duo OS 10.6.8