Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Radio Child #1
Form validation problem
GoDaddy may be one of the worst hosting companies in the world when it comes to
tech support. You have to use their gdform.php (or asp) to get a form to work
from their servers. They claim their gdform will allow validation, but won't
tell you how. Using Dreamweaver MX I created the standard behavior validation
from the submit button, but it doesn't work. Any ideas? -Mike My code is
below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Welcome To The Coordinated Planning Group</title>
<link href="styles/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #bdb76b;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail
address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number
between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n';
}
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<form name="screensaver_request" action="gdform.php" method="post">
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td height="5" background="images/olive_spacer.gif"></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" width="5" background="images/khaki_spacer.gif"></td>
<td><img src="images/cpg_header.jpg" width="750" height="150"></td>
<td height="5" width="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td height="5" background="images/olive_spacer.gif"></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td height="5" colspan="2" background="images/khaki_spacer.gif">
<div align="center" class="tableBGColorKhaki">
<a href="index.html" title="Home" class="link">Home</a> |
<a href="questions.html" title="Questions To Discuss"
class="link">Questions To Discuss</a> |
<a href="matrix.html" title="The Planning Matrix" class="link">The
Planning Matrix</a> |
<a href="bio.html" title="About Randy Schuster" class="link">Biography</a>
|
<a href="staff.html" title="Meet The Staff" class="link">Our Staff</a> |
<a href="links.html" title="Access Your Account" class="link">Your
Accounts</a> |
<a href="links.html" title="Links" class="link">Links</a> |
<a href="contact.html" title="Contact Us" class="link">Contact Us</a>
</div> </td>
</tr>
<tr><td height="5" colspan="2" background="images/olive_spacer.gif"></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr><td bgcolor="#FFFFFF" class="bodyblack">
<div align="justify"><span class="bodyblackbold">QUOTATIONS</span><br />
We get frequent requests to distribute a collection of powerful quotations
we have assembled and made available as a Microsoft PowerPoint Screensaver. If
you would like a copy, please complete this form and we will be happy to send
you an link via email that will allow you to download the file.
</div></td></tr></table>
<table class="bodyblack" width="100%" border="0" cellpadding="0"
cellspacing="0" bgcolor="#FFFFFF">
<!-- Row 1 -->
<input type="hidden" name="subject" value="screensaver_request_form">
<input type="hidden" name="recipient" value="info@coordinatedplan.com">
<input type="hidden" name="redirect" value="thankyou.html">
<tr><td><div align="right"><span class="bodygreenbold">*Your
Name</span> </div>
</td>
<td>
<input type="text" name="1_fullname" size="33">
</td>
</tr>
<tr>
<!-- Row 2 -->
<td><div align="right">Company </div>
</td>
<td>
<input type="text" name="2_company" size="33">
</td>
</tr>
<!-- Row 3 -->
<td><div align="right"><span class="bodygreenbold">*E-mail
Address</span> </div>
</td>
<td>
<input type="text" name="3_email" size="33">
</td>
</tr>
<tr>
<!-- Row 4 -->
<td><div align="right">Street Address </div>
</td>
<td>
<input type="text" name="4_street" size="33">
</td>
</tr>
<tr>
<!-- Row 5 -->
<td><div align="right">City/State/Zip </div>
</td>
<td>
<input type="text" name="5_city" size="12">
<input type="text" name="6_state" size="3">
<input type="text" name="7_zip" size="8">
</td>
</tr>
<tr>
<!-- Row 6 -->
<td><div align="right">Telephone </div>
</td>
<td>
<input type="text" name="8_telephone" size="33">
</td>
</tr>
<tr>
</tr><tr><td> </td></tr>
<!-- Row 6 -->
<td class="bodygreenbold"><div align="right">*Required
Fields </div></td>
<td colspan="2" ><input name="submit" type="submit"
onClick="MM_validateForm('1_fullname','','R','3_em ail','','RisEmail','7_zip','',
'NisNum');return document.MM_returnValue" value="Submit">
<input type="reset" value="Reset" name="reset">
</td>
</tr><tr><td> </td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td height="5" background="images/olive_spacer.gif"></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td bgcolor="#FFFFFF"><div align="center" class="tableBGColorKhaki"><a
href="index.html" title="Home" class="link">Home</a> - <a href="questions.html"
title="Questions To Discuss" class="link">Questions To Discuss</a> - <a
href="matrix.html" title="The Planning Matrix" class="link">The Planning
Matrix</a> - <a href="bio.html" title="About Randy Schuster"
class="link">Biography</a> - <a href="staff.html" title="Meet The Staff"
class="link">Our Staff</a> - <a href="contact.html" title="Contact Us"
class="link">Contact Us</a></div></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td height="5" background="images/olive_spacer.gif"></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td><div align="justify" class="bodyfooter">Securities and Investment
Advisory services offered through Randy Schuster as a Registered Representative
and Investment Adviser Representative of <strong>1717 Capital Management
Company</strong>, a Registered Investment Adviser. Member NASD, SIPC. A
Nationwide Financial company. Representative of Nationwide Life Insurance
Company of America and other companies. Coordinated Planning Group is not an
affiliate of Nationwide Financial or its subsidiaries.</div></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td height="5" background="images/olive_spacer.gif"><div align="center"
class="bodyblackIndustry"></div></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td class="industrylink"><div align="center" class="industrylink"><a
href="legal.html" title="Privacy Statement" class="footerlink">Privacy
Statement</a> - <a href="legal.html" title="Important Legal Information"
class="footerlink">Important Legal Information</a></div></td>
<td height="5" background="images/khaki_spacer.gif"></td>
</tr>
<tr>
<td height="5" background="images/khaki_spacer.gif"></td>
<td><div align="center" class="bodyblackIndustry">©2005 The Coordina
Radio Child Guest
-
Form Validation - Can this be done?
I have a form with several dropdown menus. One dropdown menu has two options yes - no Depending on which option is selected, i want the following... -
CFFORM Validation trumping Custom Form Validation
Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two... -
Form Validation
Hi all, I am using form validation to authenticate users. In the web config file I secure a page that has only the following statement:... -
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed... -
get rid of form validation
I added form validation in MX and then deleted some form fields, so needed to change the validation behavior. I deleted the On blur from the...



Reply With Quote

