Imar, thanks again - here's the code for my page. It allows me to enter data - verifies but when I hit the send button - nothing happens.
<%
If Request.Form("btnSend").Count > 0 Then
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Web NBX V3000 Information Request"
objMessage.Sender = Request.Form("Email")
objMessage.To = "
[email protected]"
objMessage.Send
Response.Redirect("framedatanew.html")
End If
%>
<html dir="ltr" xml:lang="en" lang="en">
<head>
<title>CIO NBX Information Request Form</title>
<style type="text/css">
#errormsg
{
border:2px solid #c00;
padding:5px;
width:20em;
}
.error
{
background:#fcc;
}
</style>
<script type="text/javascript">
function checkform(of)
{
// Test if DOM is available and there is an element called required
if(!document.getElementById || !document.createTextNode){return;}
if(!document.getElementById('required')){return;}
// Define error messages and split the required fields
var errorID='errormsg';
var errorClass='error'
var errorMsg='Please enter or change the fields marked with a ';
var errorImg='alert.gif';
var errorAlt='Error';
var errorTitle='This field has an error!';
var reqfields=document.getElementById('required').valu e.split(',');
// Cleanup old mess
// if there is an old errormessage field, delete it
if(document.getElementById(errorID))
{
var em=document.getElementById(errorID);
em.parentNode.removeChild(em);
}
// remove old images and classes from the required fields
for(var i=0;i<reqfields.length;i++)
{
var f=document.getElementById(reqfields[i]);
if(!f){continue;}
if(f.previousSibling && /img/i.test(f.previousSibling.nodeName))
{
f.parentNode.removeChild(f.previousSibling);
}
f.className='';
}
// loop over required fields
for(var i=0;i<reqfields.length;i++)
{
// check if required field is there
var f=document.getElementById(reqfields[i]);
if(!f){continue;}
// test if the required field has an error,
// according to its type
switch(f.type.toLowerCase())
{
case 'text':
if(f.value=='' && f.id!='email'){cf_adderr(f)}
// email is a special field and needs checking
if(f.id=='email' && !cf_isEmailAddr(f.value)){cf_adderr(f)}
break;
case 'textarea':
if(f.value==''){cf_adderr(f)}
break;
case 'checkbox':
if(!f.checked){cf_adderr(f)}
break;
case 'select-one':
if(!f.selectedIndex && f.selectedIndex==0){cf_adderr(f)}
break;
}
}
return !document.getElementById(errorID);
/* Tool methods */
function cf_adderr(o)
{
// create image, add to and colourise the error fields
var errorIndicator=document.createElement('img');
errorIndicator.alt=errorAlt;
errorIndicator.src=errorImg;
errorIndicator.title=errorTitle;
o.className=errorClass;
o.parentNode.insertBefore(errorIndicator,o);
// Check if there is no error message
if(!document.getElementById(errorID))
{
// create errormessage and insert before submit button
var em=document.createElement('div');
em.id=errorID;
var newp=document.createElement('p');
newp.appendChild(document.createTextNode(errorMsg) )
// clone and insert the error image
newp.appendChild(errorIndicator.cloneNode(true));
em.appendChild(newp);
// find the submit button
for(var i=0;i<of.getElementsByTagName('input').length;i++)
{
if(/submit/i.test(of.getElementsByTagName('input')[i].type))
{
var sb=of.getElementsByTagName('input')[i];
break;
}
}
if(sb)
{
sb.parentNode.insertBefore(em,sb);
}
}
}
function cf_isEmailAddr(str)
{
return str.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/);
}
}
</script>
</head>
<body>
<form action="EmailWithCDO.asp" method="post" enctype="text/plain" onsubmit="return checkform(this);">
<p>
<input type="hidden" name="required" id="required" value="configuration,company,lastname,firstname,ph one,email,state" />
</p>
<table border="0" width="24%" cellpadding="0">
<tr>
<td width="1%" valign="left">
<div align="left">Configuration---  *Required </td>
<td width="2%" valign="left"><height="20">
<select name="configuration" id="configuration">
<option selected>Select Configuration</option>
<option>Basic Configuration</option>
<option>Standard Configuration</option>
<option>Advanced Configuration</option>
<option>Custom Configuration</option>
</select>
</td>
</tr>
<tr>
<td width="1%" valign="Left">
<div align="left">Company Name---  *Required </td>
<td width="2% valign="Left"><height="20">
<input type="text" name="Company" id="Company"></td>
</tr>
<tr>
<td width="1%" valign="Left">
<div align="left">Last Name---  *Required </td>
<td width="2% valign="Left"><height="20">
<input type="text" name="LastName" id="LastName"></td>
</tr>
<tr>
<td width="1%" valign="Left">
<div align="left">First Name---  *Required </td>
<td width="2% valign="Left"><height="20">
<input type="text" name="FirstName" id="FirstName"></td>
</tr>
<tr>
<td width="1%" valign="Left">
<div align="left">Title---</td>
<td width="2% valign="Left"><height="20">
<input type="text" name="Title" id="Title"></td>
</tr>
<tr>
<td width="1%" valign="Left">
<div align="left">Phone Number---  *Required </td>
<td width="2% valign="Left"><height="20">
<input type="text" name="Phone" id="Phone"></td>
</tr>
<tr>
<td width="1%" valign="Left">
<div align="left">Email Address---  *Required </td>
<td width="2% valign="Left"><height="20">
<input type="text" name="Email" id="Email"></td>
</tr>
<tr>
<td width="1%" valign="left">
<div align="left">State---  *Required </td>
<td width="2%" valign="left"><height="20">
<select name="state" id="State">
<option selected>Select State</option>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<option>California</option>
<option>Colorado</option>
<option>Connecticut</option>
<option>Delaware</option>
<option>Florida</option>
<option>Georgia</option>
<option>Hawaii</option>
<option>Idaho</option>
<option>Illinois</option>
<option>Indiana</option>
<option>Iowa</option>
<option>Kansas</option>
<option>Kentucky</option>
<option>Louisiana</option>
<option>Maine</option>
<option>Maryland</option>
<option>Massachusetts</option>
<option>Michigan</option>
<option>Minnesota</option>
<option>Mississippi</option>
<option>Missouri</option>
<option>Montana</option>
<option>Nebraska</option>
<option>Nevada</option>
<option>New Hampshire</option>
<option>New Jersey</option>
<option>New Mexico</option>
<option>New York</option>
<option>North Carolina</option>
<option>North Dakota</option>
<option>Ohio</option>
<option>Oklahoma</option>
<option>Oregon</option>
<option>Pennsylvania</option>
<option>Rhode Island</option>
<option>South Carolina</option>
<option>South Dakota</option>
<option>Tennessee</option>
<option>Texas</option>
<option>Utah</option>
<option>Vermont</option>
<option>Virginia</option>
<option>Washington</option>
<option>West Virginia</option>
<option>Wisconsin</option>
<option>Wyoming</option>
<option>Out of United States</option>
</select>
</td>
</tr>
<tr>
<td height="40" colspan="2">If
you would like to send us a message or ask us any questions, you may enter
it here:</td>
<tr>
<td colspan="2" valign="top"><strong></strong>
<textarea name="comments" id="comments" cols="60" rows="4">
</textarea>
</td>
<tr>
<td height="40" colspan="2" valign="bottom">By
submitting this information to us you are requesting a sales quote on
the configuration listed above. You are not subscribing to any other offers.</td>
</tr>
</table>
</p>
<p>
<p>
<input type="submit" name="btnSend" value="Send information" />
</p>
</form>
</body>
</html>
Hope you can see what I'm doing wrong!
Thanks!
dartcoach