answersLogoWhite

0

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

13y ago

What else can I help you with?

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


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

i think it wont glow .


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


Why wont my yellow bellied map turtle get any bigger?

Maybe its at its fully grown size.


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


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.


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?


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.