answersLogoWhite

0


Best Answer

I asked the question and kinda new to Javascript and a total newbie to it

My validation code is

}

function ValidateForm()

{

var x=document.forms["MyForm"]["First Name"].value;

if (x==null x=="")

{

alert("First name must be filled out");

return false;

}

var x=document.forms["MyForm"]["Last Name"].value;

if (x==null x=="")

{

alert("Last name must be filled out");

return false;

}

var x=document.forms["MyForm"]["Address"].value;

if (x==null x=="")

{

alert("Address must be filled out");

return false;

}

var x=document.forms["MyForm"]["Postcode"].value;

if (x==null x=="")

{

alert("Postcode must be filled out");

return false;

}

var x=document.forms["MyForm"]["email"].value;

var atpos=x.indexOf("@");

var dotpos=x.lastIndexOf(".");

if (atpos<1 dotpos=x.length)

alert("Email must be filled out");

return false;

return ture;

}

My form code is:

Title








For some reason the Validation works fine but when all of the information is placed correctly the form will not go to *Untitled-2.html* the button is useless after i have entered all the information please help me

Thx

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Very likely it's because you have an error in your code. If you look up how to use Chrome's Development tools you should be able to see the errors.

========================

Answer 2: You should also see if your javascript is disabled in the browser.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why wont your JavaScript form validation work fully?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Do you need java script?

In general, no you do not need Java or JavaScript to play music on your computer. However, if you want to hear music played by a website, there's a good chance that it uses one of these technologies to do it, in which case you would need Java or a JavaScript enabled browser.


What is the purpose of on blur event in javascript?

When a child window opens and if we don't want it to disturb the work going on in parent window then blur event will open the child window but wont show it in front of the parent window ie the child will open behind the parent window.Hope this answers your question.


Print array in reverse order vb6?

Well maybe you can make another form show() but make its opacity 0 so people wont know the secret behind it, no the other form, make it display the array backwards and use the print dialog to print the hidden form.


How does open source products relate in a programming language?

We have two kinds of programming languages, Open Source and Close Source :) Open Source like javascript and Close Source ":)" like .exe files (Compiled Files) Open Source files like javascript wont be compiled and will be used as it wrote. if you think php is open source or not, i should tell you it's a different thing, the first thing you should be worry about is the security, javascript is open source and open source files are less or even unsecured files, it means everyone can see your source code, they can break down your security easily.. So what you should do? USE SOME ENCIPHER PROGRAM TO MAKE IT HARDER TO BREAK DOWN (it will just make it harder.. not impossible) Close Source (Complied Files) are those that you write an code then it will be complied to something else to be understand by computers, like you write c# codes in Visual Studio and when you want to run it, your codes will be compiled to an exe application, then your computer will be able to run it. Compiled Files is more secure but keep it in mind it don't mean it's unbreakable.. nowdays there are reverse programs out there.. :) Wish i got your question right.. :)


How is protective clothing developed?

I wont get creased

Related questions

What is wont in expanded form?

There is no expanded form for wont (has a tendency to).


Do you need java script?

In general, no you do not need Java or JavaScript to play music on your computer. However, if you want to hear music played by a website, there's a good chance that it uses one of these technologies to do it, in which case you would need Java or a JavaScript enabled browser.


Can a female chihuahua have fully grown yorkies babies or will it kill her?

no they wont kill her


Can you trade a dsi for a dsi XL at gamestop?

You can but it wont fully cove the cost for a xl.


Why wont your ds charge for longer than 4 hours?

because its fully charged


How can you tell if the blue n intendo DSi is fully charged?

i think it wont glow .


Why wont my yellow bellied map turtle get any bigger?

Maybe its at its fully grown size.


Why wont Super Smash Flash 2 version 0.5a work?

you probably didn't have all the right requirements in playing it did you check your adobe flash or your javascript maybe it's one of them?


Why wont MySpace work on Mozilla Firefox?

it works on mine --Mine, too...you might have cookies or javascript turned off. If you use NoScript or Adblock, you have to disable them for myspace to work in Firefox.


Ford bronco 95 low voltage 8 amps wont start?

Dead battery Fully charge or replace Dead battery Fully charge or replace Dead battery Fully charge or replace


What is a potential danger of using SPAM filters?

Spam filters wont fully protect you from virus spams.


1999 Isuzu trooper Transmisssion wont go into gear?

The brake pedal has to be fully depressed for the stick to engage.