Forums

HELP!!

junjun 13 Mar, 2007
Hi there!

Need a great help from u guys here!!

Below are my codes:


<html>
<head>
<title>JavaScript Form Validation Example</title>
<style type="text/css">
body
{
background:white;
font-size:12px;
font-family:arial;
}
table
{
background:navy;
color:white;
font-weight:bold;
}
</style>

<script language="javascript" type="text/javascript">


function validateForm(contact)
{

if(document.forms.contact.fullName.value=="")
{
alert("Please enter your full name.");
document.forms.contact.fullName.focus();
return false;
}

if(document.forms.contact.email.value=="")
{
alert("Please enter your email address.");
document.forms.contact.email.focus();
return false;
}

if(document.forms.contact.phoneNum.value=="")
{
alert("Please enter your phone number.");
document.forms.contact.phoneNum.focus();
return false;
}

}

</script>


</script>

</head>

<body>
<form name="contact" method="post" action="" onSubmit="return validateForm(contact);">
<table border="1">

<tr>
<td>Name:</td>
<td><input type="text" name="fullName" length="25"></td>
</tr>

<tr>
<td>Email:</td>
<td><input type="text" name="email" length="25"></td>
</tr>

<tr>
<td>Phone Number</td>
<td><input type="text" name="phoneNum" length="25"></td>
</tr>

<tr>
<td><input type="submit" name="submit" value="Submit"></td>
<td><input type="reset" name="reset"></td>
</tr>

</table>
</form>

</body>
</html>




I tried many times to inserted the codes inside my site, although i can see the form, but my "form validator" doesn't work😟


Can somebody guide me on how to insert those codes inside my com_chronocontact / edit site? How to divide them and place piece by piece inside my site??

Thx thx!
Max_admin 13 Mar, 2007
u have 2
</script>
tags

cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.