Question

Submit form through email CDOSYS and CDONTS

Asked by: Platini

I want to submit this form to email (CDOSYS and CDONTS) Could someone tell me how this can be done?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
 
<head>
 
 
 
<title>Untitled Document</title>
 
 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
 
 
<style type="text/css">
 
<!--
 
.style2 {
      font: 12px;
      font-size: small;
      font-family: Verdana;
}
 
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif}
 
th
      { color: #000000; font-family: Tahoma, Verdana; font-size: 11px; }
.newStyle1 {
      font-family: Verdana;
      font-size: 12px;
      background-color: #CCE6FF;
}
.newStyle2 {
      color: #D9ECFF;
      background-color: #FFFFFF;
}
 
-->
 
</style>
 
 
 
<script type="text/javascript">
<!--
/*********************************************************************
                         Original Script By
               Patrick Fairfield (a.k.a fritz_the_blank)
                         Fairfield Consulting
     ========================================================
                         Edited by Jay Solomon
                    jaysolomon *AT* pclnet *DOT* net
*********************************************************************/
var strAlertMsg = ""
var focusField = ""
//============================================================
//validate Date
function isDate(theForm,strFieldName,strMsg){
    var objFormField = theForm.elements[strFieldName];
    strDate = objFormField.value;
    if(strDate.length>0){
            var dateregex=/^[ ]*[0]?(\d{1,2})\/(\d{1,2})\/(\d{4,})[ ]*$/;
             var match=strDate.match(dateregex);
             if (match){
                       var tmpdate=new Date(match[3],parseInt(match[1],10)-1,match[2]);
                  if (tmpdate.getDate()==parseInt(match[2],10) && tmpdate.getFullYear()==parseInt(match[3],10) && (tmpdate.getMonth()+1)==parseInt(match[1],10)){
                    return true;
                    }
             }
                    strAlertMsg += "- "+ strMsg +" is Required.\nExample: 01/01/2003\n";
               if(!focusField) focusField =""+ strFieldName +"";
         return false;
    }
    else{
          return true;
    }
}
//========================================================================
//Validate Us Phone. Ex. (999) 999-9999 or (999)999-9999
function isPhone(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/;
      if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n    Example:\n(999)999-9999 or (999) 999-9999\n";
     if(!focusField) focusField=""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate US zip code in 5 digit format or zip+4 format. 99999 or 99999-9999
function isZipCode(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
     if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//==========================================================================
//Validate the Select
function hasSelection(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     if(objFormField.selectedIndex ==0)     {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
           return false;
           }
     return true;
}
//========================================================================
//Validate Check Box
function isChecked(theForm,strFieldName,strMsg) {
     var objFormField= theForm.elements[strFieldName];
     var strValue= objFormField.checked;
     if (!strValue) {
          //alert("The \""+ strMsg +"\" box is checked!")
          //} else {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Text Box
function isEmpty(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     strValue = strValue.split(" ").join("")
     if(strValue.length<1){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Email
function isEmail(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName]
     var strEmail = objFormField.value;
     var bolValid = true;
          if(strEmail.length < 7){
          bolValid = false;
          }
          if(strEmail.lastIndexOf(" ") >0){
          bolValid = false;
          }
          var intLastDot = strEmail.lastIndexOf(".")
          if(intLastDot == -1 ||  strEmail.length - intLastDot >4){
          bolValid = false;
          }
          var intAt = strEmail.lastIndexOf("@")
          if(intAt == -1 ||  strEmail.length - intAt < 5){
          bolValid = false;
          }
          if(!bolValid){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          }
     return bolValid;
}
//========================================================================
//Validate Radio Button
function checkRadioControl(theForm,strFieldName,strMsg){
          var objFormField = theForm.elements[strFieldName]
          intControlLength = objFormField.length
          bolSelected = false;
          for (i=0;i<intControlLength;i++){
          if(objFormField[i].checked){
          bolSelected = true;
          break;
          }
     }
     if(! bolSelected){
	     if(!focusField) focusField =""+ objFormField[0].id +""; 
          strAlertMsg += "- "+ strMsg +" is Required.\n";
          return false;
          }
     return true;
}
//========================================================================
//Compare the Fields
function compareFields(theForm,strFieldName1,strFieldName2,strMsg){
          var objFormField1= theForm.elements[strFieldName1];
          var objFormField2= theForm.elements[strFieldName2];
          var strValue1= objFormField1.value;
          var strValue2= objFormField2.value;
     if(strValue1 != strValue2){
          strAlertMsg +="The "+ strMsg +" fields do not match, please try again.\n";
     if(!focusField) focusField =""+ strFieldName1 +"";
          return false;
          }
     return true;
}
//========================================================================
//Format Phone Number 9999999999 = (999)999-9999
//Call the function like so onKeyPress="javascript:formatPhone(this);
function formatPhone(objFormField){
     intFieldLength = objFormField.value.length;
     if(intFieldLength == 3){
          objFormField.value = "(" + objFormField.value + ") ";
          return false;
          }
    if(intFieldLength >= 9 && intFieldLength <= 10){
        objFormField.value = objFormField.value + "-";
        return false;
        }
}
//========================================================================
//End .js File
//Begin Page Validation
function validateForm(theForm){
strAlertMsg = ""
focusField = ""
     
     isEmpty(theForm,'Customer_Name','Name')
     isEmpty(theForm,'email','Email')
     isEmpty(theForm,'dDate','Date')
     checkRadioControl(theForm,'radio1','Radio')
     checkRadioControl(theForm,'radio2','Radio')
       isEmpty(theForm,'PhoneB','textbox')
     checkRadioControl(theForm,'radio3','Radio')
       checkRadioControl(theForm,'radio4','Radio')
     checkRadioControl(theForm,'radio5','Radio')
     checkRadioControl(theForm,'radio6','Radio')
     checkRadioControl(theForm,'radio7','Radio')
     checkRadioControl(theForm,'radio8','Radio')
     checkRadioControl(theForm,'radio9','Radio')
         if(strAlertMsg !=""){
          alert("Please correct the following errors:\n____________________________\n\n" + strAlertMsg);
          eval("theForm." + focusField + ".focus()");
//alert(focusField);
theForm[focusField].focus();
        return false;
    }
    return true;
}
//-->
</script>
 
 
 
 
 
 
</head>
 
<body class="sub">
 
 
 
<form id="form1" action="" method="post" onsubmit="return validateForm(this);">
 
 
 
 
   
 
  <table width="90%" border="0" cellspacing="2" cellpadding="4">
 
    
 
    <tr style="vertical-align: top">
 
      
 
      <td valign="top" nowrap="nowrap" style="width: 722px; height: 31px;">
 
        <table cellSpacing="0" cellPadding="0" align="left" border="0" style="width: 713px">
                  <tr>
                        <th style="FONT-SIZE: 12px; COLOR: white" noWrap bgColor="#4682b4">  
                        Visual Impairment Form<img height="1" src="pixel.gif" width="10" border="0" /></th>
                        <td>
                        <img height="21" src="formtab_r.gif" width="10" border="0" /></td>
                        <td width="100%" background="line_t.gif"> </td>
                  </tr>
            </table>
            </td>
 
    </tr>
 
    
 
    <tr style="vertical-align: top">
 
      
 
      <td valign="top" nowrap="nowrap" style="width: 722px">
 
        <p class="style2">
 
          <label id="lblCustome_Name" for="Customer_Name" class="style2">Name</label>                                          
 
          <input type="text" id="Customer_Name" name="Customer_Name" class="newStyle1" tabindex="0" /> 
<br /> 
          <label id="lblemail" for="email" class="style2">Please enter your email address</label>       
 
          <input type="text" name="email" id="email" class="newStyle1" tabindex="0" />
<br />      
 
          <label id="lbldDate" for="dDate" class="style2">Please enter today&#39;s date</label>               
 
          <input type="text" name="dDate" id="dDate" class="newStyle1" tabindex="0" />
 
           
 
           
 
           
          
            <FIELDSET>
          <LEGEND> Do you need a screen reader to 
                  access your computer?</LEGEND>
          
 
            <input type="radio" name="radio1" value="Yes" id="radio1y" class="style2" tabindex="0" />
 
                  Yes
 
          
 
          <label><input type="radio" name="radio1" value="No" id="radio1n" class="style2" />
 
                  No</label>
 
         </FIELDSET>
        <p class="style2">
 
         
 
        
 
        <label id="lblradio2" for="radio2">Do you need to hear your screen reader 
            while on the phone?</label>
 
          
              
          <input type="radio" name="radio2" value="Yes" id="radio2y" class="style2" tabindex="0" />
 
            Yes
 
          
          <input type="radio" name="radio2" value="No" id="radio2n" class="style2" />
 
            No
 
        <p class="style2">
 
          <label id="lblFname" for="PhoneB">What brand and model of phone do you 
                  use?
</label>
 
          <textarea name="PhoneB" id="PhoneB" rows="5" class="newStyle1" style="width: 373px" tabindex="0"></textarea>
 
         
 
        <p class="style2">
 
          
 
          <span class="style3">
 
          <label>Do you need a braille display for reading information on your 
                  computer?</label>
 
          
 
          <label id="lblFname" for="radio3">
                  <input type="radio" name="radio3" value="Yes" id="radio3y" class="style2" tabindex="0" />
                  Yes</label>
 
 
          <label>
 
          <input type="radio" name="radio3" value="No" id="radio3n" class="style2" tabindex="0" />
 
                  No</label>
 
          </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you prefer a 40 or 80 cell braille display?</label>
 
        
 
        <label id="lblFname" for="radio4">
            <input type="radio" name="radio4" value="40 cell" id="radio4y" class="style2" tabindex="0" /> 
 
        40 cell</label>
 
        <label>
 
        <input type="radio" name="radio4" value="80 cell" id="radio4n" class="style2" tabindex="0" />
 
            80 cell</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to access printed materials to complete your daily 
            assignments?</label>
 
        
 
        <label id="lblFname" for="radio5"><input type="radio" name="radio5" value="Yes" id="radio5y" />
 
            Yes</label>
 
        <label>
 
        <input name="radio5" type="radio" id="radio5n" value="No" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to produce hardcopy braille materials in your daily 
            work activities?</label>
 
        
 
        <label id="lblFname" for="radio6"><input type="radio" name="radio6" value="Yes" id="radio6y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio6" value="No" id="radio6n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have access to a shared braille embosser (printer)?</label>
 
        
 
        <label id="lblFname" for="radio7"><input type="radio" name="radio7" value="Yes" id="radio7y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio7" value="No" id="radio7n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have issues locating keys on your keyboard?</label>
 
        
 
<label id="lblFname" for="radio8"><input type="radio" name="radio8" value="Yes" id="radio8y" /> 
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio8" value="No" id="radio8n" />
 
            No</label>
 
      </span></p>
 
      <p class="StoryContentColor style2 style3"><span class="style2">
 
        <label>Do you need to take notes during meetings away from your desk 
            and/or in training sessions?</label>
 
        
 
        <label id="lblFname" for="radio9"><input type="radio" name="radio9" value="Yes" id="radio9y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio9" value="No" id="radio9n" />
 
            No</label>
 
      </span></p></td>
 
    </tr>
 
    
 
    <tr style="vertical-align: top">
 
      <td style="width: 722px">        
 
     <input type="submit" id="btnSubmit" name="btnSubmit" value="Submit" />
 
     <input type="reset" id="btnReset" name="btnReset" value="Reset" />
 
            </td>
 
    </tr>
 
  </table>
 
  
 
  </form>
 
 
 
 
</body>
 
</html>

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-02-12 at 14:09:56ID23157928
Tags

javascript

,

IE 6 and 7

Topic

JavaScript

Participating Experts
1
Points
500
Comments
16

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. CDONTS vs CDOSYS
    What is the best way to send HTML formatted emails? I know that CDONTS works great as I have tried it. There seems to be some limitation on the amount of HTML code that I can send using CDOSYS. Is there a way on CDONTS to send a text only version of the email and if support...
  2. CDOSYS
    How knows where there is exact information on the use of CDOSYS in ASP. I need to convert all my CDONTS to CDOSYS because of an environement change.
  3. CDOSYS + CDONTS >> update to sendmail.asp
    Hi. I was using a sendmail.asp form on a windows host without any problems for the last couple of years, suddenly stopped working. When I contacted the host, I was told that they are no longer using CDONTS, because they have upgraded to Windows server 2003. I was told that I ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: hieloPosted on 2008-02-12 at 14:24:17ID: 20879846

Fill in the appropriate email info

<%@LANGAUGE="JAVASCRIPT"%>
<%
if("undefined" != String(Request("btnSubmit")) )
{
	var data = "";
	data += "\nCustomer Name: " + Request("Customer_Name");
	data += "\nEmail: " + Request("email");
	data += "\nDate: " + Request("dDate");
	data += "\nRadio 1: " + Request("radio1");
	data += "\nRadio 2: " + Request("radio2");
	data += "\nRadio 3: " + Request("radio3");
	data += "\nRadio 4: " + Request("radio4");
	data += "\nRadio 5: " + Request("radio5");
	data += "\nRadio 6: " + Request("radio6");
	data += "\nRadio 7: " + Request("radio7");
	data += "\nRadio 8: " + Request("radio8");
	data += "\nRadio 9: " + Request("radio9");
	
	var myMail=CreateObject("CDO.Message");
	myMail.Subject="Sending email with CDO";
	myMail.From="mymail@mydomain.com";
	myMail.To="someone@somedomain.com";
	myMail.Bcc="someoneelse@somedomain.com";
	myMail.Cc="someoneelse2@somedomain.com";
	myMail.TextBody=data;
	myMail.Send();
	myMail=null; 
	Response.Write("Thank You!")
Response.End
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
 
<head>
 
 
 
<title>Untitled Document</title>
 
 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
 
 
<style type="text/css">
 
<!--
 
.style2 {
      font: 12px;
      font-size: small;
      font-family: Verdana;
}
 
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif}
 
th
      { color: #000000; font-family: Tahoma, Verdana; font-size: 11px; }
.newStyle1 {
      font-family: Verdana;
      font-size: 12px;
      background-color: #CCE6FF;
}
.newStyle2 {
      color: #D9ECFF;
      background-color: #FFFFFF;
}
 
-->
 
</style>
 
 
 
<script type="text/javascript">
<!--
/*********************************************************************
                         Original Script By
               Patrick Fairfield (a.k.a fritz_the_blank)
                         Fairfield Consulting
     ========================================================
                         Edited by Jay Solomon
                    jaysolomon *AT* pclnet *DOT* net
*********************************************************************/
var strAlertMsg = ""
var focusField = ""
//============================================================
//validate Date
function isDate(theForm,strFieldName,strMsg){
    var objFormField = theForm.elements[strFieldName];
    strDate = objFormField.value;
    if(strDate.length>0){
            var dateregex=/^[ ]*[0]?(\d{1,2})\/(\d{1,2})\/(\d{4,})[ ]*$/;
             var match=strDate.match(dateregex);
             if (match){
                       var tmpdate=new Date(match[3],parseInt(match[1],10)-1,match[2]);
                  if (tmpdate.getDate()==parseInt(match[2],10) && tmpdate.getFullYear()==parseInt(match[3],10) && (tmpdate.getMonth()+1)==parseInt(match[1],10)){
                    return true;
                    }
             }
                    strAlertMsg += "- "+ strMsg +" is Required.\nExample: 01/01/2003\n";
               if(!focusField) focusField =""+ strFieldName +"";
         return false;
    }
    else{
          return true;
    }
}
//========================================================================
//Validate Us Phone. Ex. (999) 999-9999 or (999)999-9999
function isPhone(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/;
      if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n    Example:\n(999)999-9999 or (999) 999-9999\n";
     if(!focusField) focusField=""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate US zip code in 5 digit format or zip+4 format. 99999 or 99999-9999
function isZipCode(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
     if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//==========================================================================
//Validate the Select
function hasSelection(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     if(objFormField.selectedIndex ==0)     {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
           return false;
           }
     return true;
}
//========================================================================
//Validate Check Box
function isChecked(theForm,strFieldName,strMsg) {
     var objFormField= theForm.elements[strFieldName];
     var strValue= objFormField.checked;
     if (!strValue) {
          //alert("The \""+ strMsg +"\" box is checked!")
          //} else {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Text Box
function isEmpty(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     strValue = strValue.split(" ").join("")
     if(strValue.length<1){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Email
function isEmail(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName]
     var strEmail = objFormField.value;
     var bolValid = true;
          if(strEmail.length < 7){
          bolValid = false;
          }
          if(strEmail.lastIndexOf(" ") >0){
          bolValid = false;
          }
          var intLastDot = strEmail.lastIndexOf(".")
          if(intLastDot == -1 ||  strEmail.length - intLastDot >4){
          bolValid = false;
          }
          var intAt = strEmail.lastIndexOf("@")
          if(intAt == -1 ||  strEmail.length - intAt < 5){
          bolValid = false;
          }
          if(!bolValid){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          }
     return bolValid;
}
//========================================================================
//Validate Radio Button
function checkRadioControl(theForm,strFieldName,strMsg){
          var objFormField = theForm.elements[strFieldName]
          intControlLength = objFormField.length
          bolSelected = false;
          for (i=0;i<intControlLength;i++){
          if(objFormField[i].checked){
          bolSelected = true;
          break;
          }
     }
     if(! bolSelected){
           if(!focusField) focusField =""+ objFormField[0].id +""; 
          strAlertMsg += "- "+ strMsg +" is Required.\n";
          return false;
          }
     return true;
}
//========================================================================
//Compare the Fields
function compareFields(theForm,strFieldName1,strFieldName2,strMsg){
          var objFormField1= theForm.elements[strFieldName1];
          var objFormField2= theForm.elements[strFieldName2];
          var strValue1= objFormField1.value;
          var strValue2= objFormField2.value;
     if(strValue1 != strValue2){
          strAlertMsg +="The "+ strMsg +" fields do not match, please try again.\n";
     if(!focusField) focusField =""+ strFieldName1 +"";
          return false;
          }
     return true;
}
//========================================================================
//Format Phone Number 9999999999 = (999)999-9999
//Call the function like so onKeyPress="javascript:formatPhone(this);
function formatPhone(objFormField){
     intFieldLength = objFormField.value.length;
     if(intFieldLength == 3){
          objFormField.value = "(" + objFormField.value + ") ";
          return false;
          }
    if(intFieldLength >= 9 && intFieldLength <= 10){
        objFormField.value = objFormField.value + "-";
        return false;
        }
}
//========================================================================
//End .js File
//Begin Page Validation
function validateForm(theForm){
strAlertMsg = ""
focusField = ""
     
     isEmpty(theForm,'Customer_Name','Name')
     isEmpty(theForm,'email','Email')
     isEmpty(theForm,'dDate','Date')
     checkRadioControl(theForm,'radio1','Radio')
     checkRadioControl(theForm,'radio2','Radio')
       isEmpty(theForm,'PhoneB','textbox')
     checkRadioControl(theForm,'radio3','Radio')
       checkRadioControl(theForm,'radio4','Radio')
     checkRadioControl(theForm,'radio5','Radio')
     checkRadioControl(theForm,'radio6','Radio')
     checkRadioControl(theForm,'radio7','Radio')
     checkRadioControl(theForm,'radio8','Radio')
     checkRadioControl(theForm,'radio9','Radio')
         if(strAlertMsg !=""){
          alert("Please correct the following errors:\n____________________________\n\n" + strAlertMsg);
          eval("theForm." + focusField + ".focus()");
//alert(focusField);
theForm[focusField].focus();
        return false;
    }
    return true;
}
//-->
</script>
 
 
 
 
 
 
</head>
 
<body class="sub">
 
 
 
<form id="form1" action="<%=Request.ServerVariables('SCRIPT_NAME')%>" method="post" onsubmit="return validateForm(this);">
 
 
 
 
   
 
  <table width="90%" border="0" cellspacing="2" cellpadding="4">
 
    
 
    <tr style="vertical-align: top">
 
      
 
      <td valign="top" nowrap="nowrap" style="width: 722px; height: 31px;">
 
        <table cellSpacing="0" cellPadding="0" align="left" border="0" style="width: 713px">
                  <tr>
                        <th style="FONT-SIZE: 12px; COLOR: white" noWrap bgColor="#4682b4">  
                        Visual Impairment Form<img height="1" src="pixel.gif" width="10" border="0" /></th>
                        <td>
                        <img height="21" src="formtab_r.gif" width="10" border="0" /></td>
                        <td width="100%" background="line_t.gif"> </td>
                  </tr>
            </table>
            </td>
 
    </tr>
 
    
 
    <tr style="vertical-align: top">
 
      
 
      <td valign="top" nowrap="nowrap" style="width: 722px">
 
        <p class="style2">
 
          <label id="lblCustome_Name" for="Customer_Name" class="style2">Name</label>                                          
 
          <input type="text" id="Customer_Name" name="Customer_Name" class="newStyle1" tabindex="0" />  
 
          <label id="lblemail" for="email" class="style2">Please enter your email address</label>       
 
          <input type="text" name="email" id="email" class="newStyle1" tabindex="0" /> 
      
 
          <label id="lbldDate" for="dDate" class="style2">Please enter today&#39;s date</label>               
 
          <input type="text" name="dDate" id="dDate" class="newStyle1" tabindex="0" />
 
           
 
           
 
           
          
            <FIELDSET>
          <LEGEND> Do you need a screen reader to 
                  access your computer?</LEGEND>
          
 
            <input type="radio" name="radio1" value="Yes" id="radio1y" class="style2" tabindex="0" />
 
                  Yes
 
          
 
          <label><input type="radio" name="radio1" value="No" id="radio1n" class="style2" />
 
                  No</label>
 
         </FIELDSET>
        <p class="style2">
 
         
 
        
 
        <label id="lblradio2" for="radio2">Do you need to hear your screen reader 
            while on the phone?</label>
 
          
              
          <input type="radio" name="radio2" value="Yes" id="radio2y" class="style2" tabindex="0" />
 
            Yes
 
          
          <input type="radio" name="radio2" value="No" id="radio2n" class="style2" />
 
            No
 
        <p class="style2">
 
          <label id="lblFname" for="PhoneB">What brand and model of phone do you 
                  use?
</label>
 
          <textarea name="PhoneB" id="PhoneB" rows="5" class="newStyle1" style="width: 373px" tabindex="0"></textarea>
 
         
 
        <p class="style2">
 
          
 
          <span class="style3">
 
          <label>Do you need a braille display for reading information on your 
                  computer?</label>
 
          
 
          <label id="lblFname" for="radio3">
                  <input type="radio" name="radio3" value="Yes" id="radio3y" class="style2" tabindex="0" />
                  Yes</label>
 
 
          <label>
 
          <input type="radio" name="radio3" value="No" id="radio3n" class="style2" tabindex="0" />
 
                  No</label>
 
          </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you prefer a 40 or 80 cell braille display?</label>
 
        
 
        <label id="lblFname" for="radio4">
            <input type="radio" name="radio4" value="40 cell" id="radio4y" class="style2" tabindex="0" /> 
 
        40 cell</label>
 
        <label>
 
        <input type="radio" name="radio4" value="80 cell" id="radio4n" class="style2" tabindex="0" />
 
            80 cell</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to access printed materials to complete your daily 
            assignments?</label>
 
        
 
        <label id="lblFname" for="radio5"><input type="radio" name="radio5" value="Yes" id="radio5y" />
 
            Yes</label>
 
        <label>
 
        <input name="radio5" type="radio" id="radio5n" value="No" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to produce hardcopy braille materials in your daily 
            work activities?</label>
 
        
 
        <label id="lblFname" for="radio6"><input type="radio" name="radio6" value="Yes" id="radio6y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio6" value="No" id="radio6n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have access to a shared braille embosser (printer)?</label>
 
        
 
        <label id="lblFname" for="radio7"><input type="radio" name="radio7" value="Yes" id="radio7y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio7" value="No" id="radio7n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have issues locating keys on your keyboard?</label>
 
        
 
<label id="lblFname" for="radio8"><input type="radio" name="radio8" value="Yes" id="radio8y" /> 
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio8" value="No" id="radio8n" />
 
            No</label>
 
      </span></p>
 
      <p class="StoryContentColor style2 style3"><span class="style2">
 
        <label>Do you need to take notes during meetings away from your desk 
            and/or in training sessions?</label>
 
        
 
        <label id="lblFname" for="radio9"><input type="radio" name="radio9" value="Yes" id="radio9y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio9" value="No" id="radio9n" />
 
            No</label>
 
      </span></p></td>
 
    </tr>
 
    
 
    <tr style="vertical-align: top">
 
      <td style="width: 722px">        
 
     <input type="submit" id="btnSubmit" name="btnSubmit" value="Submit" />
 
     <input type="reset" id="btnReset" name="btnReset" value="Reset" />
 
            </td>
 
    </tr>
 
  </table>
 
  
 
  </form>
 
 
 
 
</body>
 
</html>
"

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:

Select allOpen in new window

 

by: hieloPosted on 2008-02-12 at 14:25:17ID: 20879853

NOTE: Make sure you update the action attribute of your form as shown on my post

 

by: PlatiniPosted on 2008-02-12 at 14:33:13ID: 20879925

I will verify this next morining. Thanks Hielo!

 

by: hieloPosted on 2008-02-12 at 15:46:43ID: 20880457

I just noticed a mistake. This:
var myMail=CreateObject("CDO.Message");

should be:
var myMail=Server.CreateObject("CDO.Message");

 

by: PlatiniPosted on 2008-02-13 at 08:20:32ID: 20885465

I get page not found error, any ideas?

 

by: hieloPosted on 2008-02-13 at 09:30:07ID: 20886147

Set the action attribute of your <form> tag so that it points to the ASP page that will be sending the email. Page not found is a clear indication that you are not sending/submitting the form to the right place.
For the purposes of testing, save my first post as hieloEmail.asp, apply the update I mentioned on my previous post, provide your email info,  then load it from your browser. Fill the form and submit.

 

by: PlatiniPosted on 2008-02-13 at 11:17:52ID: 20887133

This is what I have in wizard_email.asp that gets called from form action in wizard.asp. I get "HTTP 500 internal server error now. Am I doing this incorrectly?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="wizard_proc.asp.vb" Inherits="_508_wizard_proc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
   <%@LANGAUGE="JAVASCRIPT"%>
<%
if("undefined" != String(Request("btnSubmit")) )
{
      var data = "";
      data += "\nCustomer Name: " + Request("Customer_Name");
      data += "\nEmail: " + Request("email");
      data += "\nDate: " + Request("dDate");
      data += "\nRadio 1: " + Request("radio1");
      data += "\nRadio 2: " + Request("radio2");
      data += "\nRadio 3: " + Request("radio3");
      data += "\nRadio 4: " + Request("radio4");
      data += "\nRadio 5: " + Request("radio5");
      data += "\nRadio 6: " + Request("radio6");
      data += "\nRadio 7: " + Request("radio7");
      data += "\nRadio 8: " + Request("radio8");
      data += "\nRadio 9: " + Request("radio9");
      
      var myMail=Server.CreateObject("CDO.Message");
      myMail.Subject="Sending email with CDO";
      myMail.From="dar@ssi.com";
      myMail.To="dar.z@ssi.com";
      myMail.TextBody=data;
      myMail.Send();
      myMail=null;
      Response.Write("Thank You!")
Response.End
}
%>
</body>
</html>

 

by: hieloPosted on 2008-02-13 at 12:36:32ID: 20887899

What I gave you is an ASP page. What you posted is as ASPX page. Open Notepad, paste the code I gave you. Supply the email info. Save it to whereever you want it on you web server. Load it through browser. Done.

 

by: PlatiniPosted on 2008-02-13 at 12:44:21ID: 20887981

Do you want me to paste the entire code above into the notepad or just the top JavaScript?

 

by: hieloPosted on 2008-02-13 at 13:01:13ID: 20888136

The entire code is a complete file. When the user gets to the page for the first time, it will not detect any submitted info so it will display the form. Once the user submits the info, it will email the data to you.

 

by: PlatiniPosted on 2008-02-13 at 13:50:41ID: 20888642

action="<%=Request.ServerVariables('SCRIPT_NAME')%>"
Is this action executing at all? is the "script_name" correct?

 

by: hieloPosted on 2008-02-13 at 22:23:07ID: 20891350

>>action="<%=Request.ServerVariables('SCRIPT_NAME')%>"
This part:
Request.ServerVariables('SCRIPT_NAME')
is supposed to give you the name of the executing script. So if you save you file as:
http://www.yourdomain.com/myscripts/test.asp
then it should evaluate to:
/myscripts/test.asp
The <%=%> is an ASP shorthand for Response.Write. So esssentially that line says:
action="Response.Write('/myscripts/test.asp')"

If it is giving you problems, then change manually to the name of your script:
action="/myscripts/test.asp"

 

by: PlatiniPosted on 2008-02-14 at 03:56:16ID: 20892559

Ok, so I did copy and pasted all code into notepad and saved it as wizard.asp. I modified the action and upladed to the server for testing and got "the page cannot be displayed" error. code is below:

<%@LANGAUGE="JAVASCRIPT"%>
<%
if("undefined" != String(Request("btnSubmit")) )
{
      var data = "";
      data += "\nCustomer Name: " + Request("Customer_Name");
      data += "\nEmail: " + Request("email");
      data += "\nDate: " + Request("dDate");
      data += "\nRadio 1: " + Request("radio1");
      data += "\nRadio 2: " + Request("radio2");
      data += "\nPhoneB: " + Request("PhoneB");
      data += "\nRadio 3: " + Request("radio3");
      data += "\nRadio 4: " + Request("radio4");
      data += "\nRadio 5: " + Request("radio5");
      data += "\nRadio 6: " + Request("radio6");
      data += "\nRadio 7: " + Request("radio7");
      data += "\nRadio 8: " + Request("radio8");
      data += "\nRadio 9: " + Request("radio9");
      
      var myMail=Server.CreateObject("CDO.Message");
      myMail.Subject="Sending email with CDO";
      myMail.From="test@ssi.com";
      myMail.To="test1@ssi.com";
      myMail.Bcc="someoneelse@somedomain.com";
      myMail.Cc="someoneelse2@somedomain.com";
      myMail.TextBody=data;
      myMail.Send();
      myMail=null;
      Response.Write("Thank You!")
Response.End
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
 
<head>
 
 
 
<title>Untitled Document</title>
 
 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
 
 
<style type="text/css">
 
<!--
 
.style2 {
      font: 12px;
      font-size: small;
      font-family: Verdana;
}
 
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif}
 
th
      { color: #000000; font-family: Tahoma, Verdana; font-size: 11px; }
.newStyle1 {
      font-family: Verdana;
      font-size: 12px;
      background-color: #CCE6FF;
}
.newStyle2 {
      color: #D9ECFF;
      background-color: #FFFFFF;
}
 
-->
 
</style>
 
 
 
<script type="text/javascript">
<!--
/*********************************************************************
                         Original Script By
               Patrick Fairfield (a.k.a fritz_the_blank)
                         Fairfield Consulting
     ========================================================
                         Edited by Jay Solomon
                    jaysolomon *AT* pclnet *DOT* net
*********************************************************************/
var strAlertMsg = ""
var focusField = ""
//============================================================
//validate Date
function isDate(theForm,strFieldName,strMsg){
    var objFormField = theForm.elements[strFieldName];
    strDate = objFormField.value;
    if(strDate.length>0){
            var dateregex=/^[ ]*[0]?(\d{1,2})\/(\d{1,2})\/(\d{4,})[ ]*$/;
             var match=strDate.match(dateregex);
             if (match){
                       var tmpdate=new Date(match[3],parseInt(match[1],10)-1,match[2]);
                  if (tmpdate.getDate()==parseInt(match[2],10) && tmpdate.getFullYear()==parseInt(match[3],10) && (tmpdate.getMonth()+1)==parseInt(match[1],10)){
                    return true;
                    }
             }
                    strAlertMsg += "- "+ strMsg +" is Required.\nExample: 01/01/2003\n";
               if(!focusField) focusField =""+ strFieldName +"";
         return false;
    }
    else{
          return true;
    }
}
//========================================================================
//Validate Us Phone. Ex. (999) 999-9999 or (999)999-9999
function isPhone(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/;
      if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n    Example:\n(999)999-9999 or (999) 999-9999\n";
     if(!focusField) focusField=""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate US zip code in 5 digit format or zip+4 format. 99999 or 99999-9999
function isZipCode(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
     if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//==========================================================================
//Validate the Select
function hasSelection(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     if(objFormField.selectedIndex ==0)     {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
           return false;
           }
     return true;
}
//========================================================================
//Validate Check Box
function isChecked(theForm,strFieldName,strMsg) {
     var objFormField= theForm.elements[strFieldName];
     var strValue= objFormField.checked;
     if (!strValue) {
          //alert("The \""+ strMsg +"\" box is checked!")
          //} else {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Text Box
function isEmpty(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     strValue = strValue.split(" ").join("")
     if(strValue.length<1){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Email
function isEmail(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName]
     var strEmail = objFormField.value;
     var bolValid = true;
          if(strEmail.length < 7){
          bolValid = false;
          }
          if(strEmail.lastIndexOf(" ") >0){
          bolValid = false;
          }
          var intLastDot = strEmail.lastIndexOf(".")
          if(intLastDot == -1 ||  strEmail.length - intLastDot >4){
          bolValid = false;
          }
          var intAt = strEmail.lastIndexOf("@")
          if(intAt == -1 ||  strEmail.length - intAt < 5){
          bolValid = false;
          }
          if(!bolValid){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          }
     return bolValid;
}
//========================================================================
//Validate Radio Button
function checkRadioControl(theForm,strFieldName,strMsg){
          var objFormField = theForm.elements[strFieldName]
          intControlLength = objFormField.length
          bolSelected = false;
          for (i=0;i<intControlLength;i++){
          if(objFormField[i].checked){
          bolSelected = true;
          break;
          }
     }
     if(! bolSelected){
           if(!focusField) focusField =""+ objFormField[0].id +"";
          strAlertMsg += "- "+ strMsg +" is Required.\n";
          return false;
          }
     return true;
}
//========================================================================
//Compare the Fields
function compareFields(theForm,strFieldName1,strFieldName2,strMsg){
          var objFormField1= theForm.elements[strFieldName1];
          var objFormField2= theForm.elements[strFieldName2];
          var strValue1= objFormField1.value;
          var strValue2= objFormField2.value;
     if(strValue1 != strValue2){
          strAlertMsg +="The "+ strMsg +" fields do not match, please try again.\n";
     if(!focusField) focusField =""+ strFieldName1 +"";
          return false;
          }
     return true;
}
//========================================================================
//Format Phone Number 9999999999 = (999)999-9999
//Call the function like so onKeyPress="javascript:formatPhone(this);
function formatPhone(objFormField){
     intFieldLength = objFormField.value.length;
     if(intFieldLength == 3){
          objFormField.value = "(" + objFormField.value + ") ";
          return false;
          }
    if(intFieldLength >= 9 && intFieldLength <= 10){
        objFormField.value = objFormField.value + "-";
        return false;
        }
}
//========================================================================
//End .js File
//Begin Page Validation
function validateForm(theForm){
strAlertMsg = ""
focusField = ""
     
     isEmpty(theForm,'Customer_Name','Name')
     isEmpty(theForm,'email','Email')
     isEmpty(theForm,'dDate','Date')
     checkRadioControl(theForm,'radio1','Radio')
     checkRadioControl(theForm,'radio2','Radio')
       isEmpty(theForm,'PhoneB','textbox')
     checkRadioControl(theForm,'radio3','Radio')
       checkRadioControl(theForm,'radio4','Radio')
     checkRadioControl(theForm,'radio5','Radio')
     checkRadioControl(theForm,'radio6','Radio')
     checkRadioControl(theForm,'radio7','Radio')
     checkRadioControl(theForm,'radio8','Radio')
     checkRadioControl(theForm,'radio9','Radio')
         if(strAlertMsg !=""){
          alert("Please correct the following errors:\n____________________________\n\n" + strAlertMsg);
          eval("theForm." + focusField + ".focus()");
//alert(focusField);
theForm[focusField].focus();
        return false;
    }
    return true;
}
//-->
</script>
 
 
 
 
 
 
</head>
 
<body class="sub">
 
 
 
<form id="form1" action="/508/wizard.asp" method="post" onsubmit="return validateForm(this);">
 
 
 
 
   
 
  <table width="90%" border="0" cellspacing="2" cellpadding="4">
 
   
 
    <tr style="vertical-align: top">
 
     
 
      <td valign="top" nowrap="nowrap" style="width: 722px; height: 31px;">
 
        <table cellSpacing="0" cellPadding="0" align="left" border="0" style="width: 713px">
                  <tr>
                        <th style="FONT-SIZE: 12px; COLOR: white" noWrap bgColor="#4682b4">  
                        Visual Impairment Form<img height="1" src="pixel.gif" width="10" border="0" /></th>
                        <td>
                        <img height="21" src="formtab_r.gif" width="10" border="0" /></td>
                        <td width="100%" background="line_t.gif"> </td>
                  </tr>
            </table>
            </td>
 
    </tr>
 
   
 
    <tr style="vertical-align: top">
 
     
 
      <td valign="top" nowrap="nowrap" style="width: 722px">
 
        <p class="style2">
 
          <label id="lblCustome_Name" for="Customer_Name" class="style2">Name</label>                                          
 
          <input type="text" id="Customer_Name" name="Customer_Name" class="newStyle1" tabindex="0" />  
 
          <label id="lblemail" for="email" class="style2">Please enter your email address</label>      
 
          <input type="text" name="email" id="email" class="newStyle1" tabindex="0" />
     
 
          <label id="lbldDate" for="dDate" class="style2">Please enter today&#39;s date</label>              
 
          <input type="text" name="dDate" id="dDate" class="newStyle1" tabindex="0" />
 
           
 
           
 
           
         
            <FIELDSET>
          <LEGEND> Do you need a screen reader to
                  access your computer?</LEGEND>
         
 
            <input type="radio" name="radio1" value="Yes" id="radio1y" class="style2" tabindex="0" />
 
                  Yes
 
         
 
          <label><input type="radio" name="radio1" value="No" id="radio1n" class="style2" />
 
                  No</label>
 
         </FIELDSET>
        <p class="style2">
 
         
 
       
 
        <label id="lblradio2" for="radio2">Do you need to hear your screen reader
            while on the phone?</label>
 
         
             
          <input type="radio" name="radio2" value="Yes" id="radio2y" class="style2" tabindex="0" />
 
            Yes
 
         
          <input type="radio" name="radio2" value="No" id="radio2n" class="style2" />
 
            No
 
        <p class="style2">
 
          <label id="lblFname" for="PhoneB">What brand and model of phone do you
                  use?
</label>
 
          <textarea name="PhoneB" id="PhoneB" rows="5" class="newStyle1" style="width: 373px" tabindex="0"></textarea>
 
         
 
        <p class="style2">
 
         
 
          <span class="style3">
 
          <label>Do you need a braille display for reading information on your
                  computer?</label>
 
         
 
          <label id="lblFname" for="radio3">
                  <input type="radio" name="radio3" value="Yes" id="radio3y" class="style2" tabindex="0" />
                  Yes</label>
 
 
          <label>
 
          <input type="radio" name="radio3" value="No" id="radio3n" class="style2" tabindex="0" />
 
                  No</label>
 
          </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you prefer a 40 or 80 cell braille display?</label>
 
       
 
        <label id="lblFname" for="radio4">
            <input type="radio" name="radio4" value="40 cell" id="radio4y" class="style2" tabindex="0" />
 
        40 cell</label>
 
        <label>
 
        <input type="radio" name="radio4" value="80 cell" id="radio4n" class="style2" tabindex="0" />
 
            80 cell</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to access printed materials to complete your daily
            assignments?</label>
 
       
 
        <label id="lblFname" for="radio5"><input type="radio" name="radio5" value="Yes" id="radio5y" />
 
            Yes</label>
 
        <label>
 
        <input name="radio5" type="radio" id="radio5n" value="No" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to produce hardcopy braille materials in your daily
            work activities?</label>
 
       
 
        <label id="lblFname" for="radio6"><input type="radio" name="radio6" value="Yes" id="radio6y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio6" value="No" id="radio6n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have access to a shared braille embosser (printer)?</label>
 
       
 
        <label id="lblFname" for="radio7"><input type="radio" name="radio7" value="Yes" id="radio7y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio7" value="No" id="radio7n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have issues locating keys on your keyboard?</label>
 
       
 
<label id="lblFname" for="radio8"><input type="radio" name="radio8" value="Yes" id="radio8y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio8" value="No" id="radio8n" />
 
            No</label>
 
      </span></p>
 
      <p class="StoryContentColor style2 style3"><span class="style2">
 
        <label>Do you need to take notes during meetings away from your desk
            and/or in training sessions?</label>
 
       
 
        <label id="lblFname" for="radio9"><input type="radio" name="radio9" value="Yes" id="radio9y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio9" value="No" id="radio9n" />
 
            No</label>
 
      </span></p></td>
 
    </tr>
 
   
 
    <tr style="vertical-align: top">
 
      <td style="width: 722px">        
 
     <input type="submit" id="btnSubmit" name="btnSubmit" value="Submit" />
 
     <input type="reset" id="btnReset" name="btnReset" value="Reset" />
 
            </td>
 
    </tr>
 
  </table>
 
 
 
  </form>
 
 
 
 
</body>
 
</html>
 

 

by: PlatiniPosted on 2008-02-14 at 04:33:52ID: 20892721

sorry the post above is incorrect. Below is the correct code

<%@LANGAUGE="JAVASCRIPT"%>
<%
if("undefined" != String(Request("btnSubmit")) )
{
	var data = "";
	data += "\nCustomer Name: " + Request("Customer_Name");
	data += "\nEmail: " + Request("email");
	data += "\nDate: " + Request("dDate");
	data += "\nRadio 1: " + Request("radio1");
	data += "\nRadio 2: " + Request("radio2");
	data += "\nPhoneB: " + Request("PhoneB");
	data += "\nRadio 3: " + Request("radio3");
	data += "\nRadio 4: " + Request("radio4");
	data += "\nRadio 5: " + Request("radio5");
	data += "\nRadio 6: " + Request("radio6");
	data += "\nRadio 7: " + Request("radio7");
	data += "\nRadio 8: " + Request("radio8");
	data += "\nRadio 9: " + Request("radio9");
	
	var myMail=Server.CreateObject("CDO.Message");
	myMail.Subject="Sending email with CDO";
	myMail.From="test@ssi.com";
	myMail.To="test1@ssi.com";
	myMail.Bcc="someoneelse@somedomain.com";
	myMail.Cc="someoneelse2@somedomain.com";
	myMail.TextBody=data;
	myMail.Send();
	myMail=null; 
	Response.Write("Thank You!")
Response.End
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
 
<head>
 
 
 
<title>Untitled Document</title>
 
 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
 
 
<style type="text/css">
 
<!--
 
.style2 {
      font: 12px;
      font-size: small;
      font-family: Verdana;
}
 
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif}
 
th
      { color: #000000; font-family: Tahoma, Verdana; font-size: 11px; }
.newStyle1 {
      font-family: Verdana;
      font-size: 12px;
      background-color: #CCE6FF;
}
.newStyle2 {
      color: #D9ECFF;
      background-color: #FFFFFF;
}
 
-->
 
</style>
 
 
 
<script type="text/javascript">
<!--
/*********************************************************************
                         Original Script By
               Patrick Fairfield (a.k.a fritz_the_blank)
                         Fairfield Consulting
     ========================================================
                         Edited by Jay Solomon
                    jaysolomon *AT* pclnet *DOT* net
*********************************************************************/
var strAlertMsg = ""
var focusField = ""
//============================================================
//validate Date
function isDate(theForm,strFieldName,strMsg){
    var objFormField = theForm.elements[strFieldName];
    strDate = objFormField.value;
    if(strDate.length>0){
            var dateregex=/^[ ]*[0]?(\d{1,2})\/(\d{1,2})\/(\d{4,})[ ]*$/;
             var match=strDate.match(dateregex);
             if (match){
                       var tmpdate=new Date(match[3],parseInt(match[1],10)-1,match[2]);
                  if (tmpdate.getDate()==parseInt(match[2],10) && tmpdate.getFullYear()==parseInt(match[3],10) && (tmpdate.getMonth()+1)==parseInt(match[1],10)){
                    return true;
                    }
             }
                    strAlertMsg += "- "+ strMsg +" is Required.\nExample: 01/01/2003\n";
               if(!focusField) focusField =""+ strFieldName +"";
         return false;
    }
    else{
          return true;
    }
}
//========================================================================
//Validate Us Phone. Ex. (999) 999-9999 or (999)999-9999
function isPhone(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/;
      if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n    Example:\n(999)999-9999 or (999) 999-9999\n";
     if(!focusField) focusField=""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate US zip code in 5 digit format or zip+4 format. 99999 or 99999-9999
function isZipCode(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     var objRegExp  = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
     if(!objRegExp.test(strValue)){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//==========================================================================
//Validate the Select
function hasSelection(theForm,strFieldName,strMsg)     {
     var objFormField = theForm.elements[strFieldName];
     if(objFormField.selectedIndex ==0)     {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
           return false;
           }
     return true;
}
//========================================================================
//Validate Check Box
function isChecked(theForm,strFieldName,strMsg) {
     var objFormField= theForm.elements[strFieldName];
     var strValue= objFormField.checked;
     if (!strValue) {
          //alert("The \""+ strMsg +"\" box is checked!")
          //} else {
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Text Box
function isEmpty(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName];
     var strValue = objFormField.value;
     strValue = strValue.split(" ").join("")
     if(strValue.length<1){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          return false;
          }
     return true;
}
//========================================================================
//Validate Email
function isEmail(theForm,strFieldName,strMsg){
     var objFormField = theForm.elements[strFieldName]
     var strEmail = objFormField.value;
     var bolValid = true;
          if(strEmail.length < 7){
          bolValid = false;
          }
          if(strEmail.lastIndexOf(" ") >0){
          bolValid = false;
          }
          var intLastDot = strEmail.lastIndexOf(".")
          if(intLastDot == -1 ||  strEmail.length - intLastDot >4){
          bolValid = false;
          }
          var intAt = strEmail.lastIndexOf("@")
          if(intAt == -1 ||  strEmail.length - intAt < 5){
          bolValid = false;
          }
          if(!bolValid){
          strAlertMsg += "- "+ strMsg +" is Required.\n";
     if(!focusField) focusField =""+ strFieldName +"";
          }
     return bolValid;
}
//========================================================================
//Validate Radio Button
function checkRadioControl(theForm,strFieldName,strMsg){
          var objFormField = theForm.elements[strFieldName]
          intControlLength = objFormField.length
          bolSelected = false;
          for (i=0;i<intControlLength;i++){
          if(objFormField[i].checked){
          bolSelected = true;
          break;
          }
     }
     if(! bolSelected){
           if(!focusField) focusField =""+ objFormField[0].id +""; 
          strAlertMsg += "- "+ strMsg +" is Required.\n";
          return false;
          }
     return true;
}
//========================================================================
//Compare the Fields
function compareFields(theForm,strFieldName1,strFieldName2,strMsg){
          var objFormField1= theForm.elements[strFieldName1];
          var objFormField2= theForm.elements[strFieldName2];
          var strValue1= objFormField1.value;
          var strValue2= objFormField2.value;
     if(strValue1 != strValue2){
          strAlertMsg +="The "+ strMsg +" fields do not match, please try again.\n";
     if(!focusField) focusField =""+ strFieldName1 +"";
          return false;
          }
     return true;
}
//========================================================================
//Format Phone Number 9999999999 = (999)999-9999
//Call the function like so onKeyPress="javascript:formatPhone(this);
function formatPhone(objFormField){
     intFieldLength = objFormField.value.length;
     if(intFieldLength == 3){
          objFormField.value = "(" + objFormField.value + ") ";
          return false;
          }
    if(intFieldLength >= 9 && intFieldLength <= 10){
        objFormField.value = objFormField.value + "-";
        return false;
        }
}
//========================================================================
//End .js File
//Begin Page Validation
function validateForm(theForm){
strAlertMsg = ""
focusField = ""
     
     isEmpty(theForm,'Customer_Name','Name')
     isEmpty(theForm,'email','Email')
     isEmpty(theForm,'dDate','Date')
     checkRadioControl(theForm,'radio1','Radio')
     checkRadioControl(theForm,'radio2','Radio')
       isEmpty(theForm,'PhoneB','textbox')
     checkRadioControl(theForm,'radio3','Radio')
       checkRadioControl(theForm,'radio4','Radio')
     checkRadioControl(theForm,'radio5','Radio')
     checkRadioControl(theForm,'radio6','Radio')
     checkRadioControl(theForm,'radio7','Radio')
     checkRadioControl(theForm,'radio8','Radio')
     checkRadioControl(theForm,'radio9','Radio')
         if(strAlertMsg !=""){
          alert("Please correct the following errors:\n____________________________\n\n" + strAlertMsg);
          eval("theForm." + focusField + ".focus()");
//alert(focusField);
theForm[focusField].focus();
        return false;
    }
    return true;
}
//-->
</script>
 
 
 
 
 
 
</head>
 
<body class="sub">
 
 
 
<form id="form1" action="/508/wizard.asp" method="post" onsubmit="return validateForm(this);">
 
 
 
 
   
 
  <table width="90%" border="0" cellspacing="2" cellpadding="4">
 
    
 
    <tr style="vertical-align: top">
 
      
 
      <td valign="top" nowrap="nowrap" style="width: 722px; height: 31px;">
 
        <table cellSpacing="0" cellPadding="0" align="left" border="0" style="width: 713px">
                  <tr>
                        <th style="FONT-SIZE: 12px; COLOR: white" noWrap bgColor="#4682b4">  
                        Visual Impairment Form<img height="1" src="pixel.gif" width="10" border="0" /></th>
                        <td>
                        <img height="21" src="formtab_r.gif" width="10" border="0" /></td>
                        <td width="100%" background="line_t.gif"> </td>
                  </tr>
            </table>
            </td>
 
    </tr>
 
    
 
    <tr style="vertical-align: top">
 
      
 
      <td valign="top" nowrap="nowrap" style="width: 722px">
 
        <p class="style2">
 
          <label id="lblCustome_Name" for="Customer_Name" class="style2">Name</label>                                          
 
          <input type="text" id="Customer_Name" name="Customer_Name" class="newStyle1" tabindex="0" />  
 
          <label id="lblemail" for="email" class="style2">Please enter your email address</label>       
 
          <input type="text" name="email" id="email" class="newStyle1" tabindex="0" /> 
      
 
          <label id="lbldDate" for="dDate" class="style2">Please enter today&#39;s date</label>               
 
          <input type="text" name="dDate" id="dDate" class="newStyle1" tabindex="0" />
 
           
 
           
 
           
          
            <FIELDSET>
          <LEGEND> Do you need a screen reader to 
                  access your computer?</LEGEND>
          
 
            <input type="radio" name="radio1" value="Yes" id="radio1y" class="style2" tabindex="0" />
 
                  Yes
 
          
 
          <label><input type="radio" name="radio1" value="No" id="radio1n" class="style2" />
 
                  No</label>
 
         </FIELDSET>
        <p class="style2">
 
         
 
        
 
        <label id="lblradio2" for="radio2">Do you need to hear your screen reader 
            while on the phone?</label>
 
          
              
          <input type="radio" name="radio2" value="Yes" id="radio2y" class="style2" tabindex="0" />
 
            Yes
 
          
          <input type="radio" name="radio2" value="No" id="radio2n" class="style2" />
 
            No
 
        <p class="style2">
 
          <label id="lblFname" for="PhoneB">What brand and model of phone do you 
                  use?
</label>
 
          <textarea name="PhoneB" id="PhoneB" rows="5" class="newStyle1" style="width: 373px" tabindex="0"></textarea>
 
         
 
        <p class="style2">
 
          
 
          <span class="style3">
 
          <label>Do you need a braille display for reading information on your 
                  computer?</label>
 
          
 
          <label id="lblFname" for="radio3">
                  <input type="radio" name="radio3" value="Yes" id="radio3y" class="style2" tabindex="0" />
                  Yes</label>
 
 
          <label>
 
          <input type="radio" name="radio3" value="No" id="radio3n" class="style2" tabindex="0" />
 
                  No</label>
 
          </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you prefer a 40 or 80 cell braille display?</label>
 
        
 
        <label id="lblFname" for="radio4">
            <input type="radio" name="radio4" value="40 cell" id="radio4y" class="style2" tabindex="0" /> 
 
        40 cell</label>
 
        <label>
 
        <input type="radio" name="radio4" value="80 cell" id="radio4n" class="style2" tabindex="0" />
 
            80 cell</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to access printed materials to complete your daily 
            assignments?</label>
 
        
 
        <label id="lblFname" for="radio5"><input type="radio" name="radio5" value="Yes" id="radio5y" />
 
            Yes</label>
 
        <label>
 
        <input name="radio5" type="radio" id="radio5n" value="No" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you need to produce hardcopy braille materials in your daily 
            work activities?</label>
 
        
 
        <label id="lblFname" for="radio6"><input type="radio" name="radio6" value="Yes" id="radio6y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio6" value="No" id="radio6n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have access to a shared braille embosser (printer)?</label>
 
        
 
        <label id="lblFname" for="radio7"><input type="radio" name="radio7" value="Yes" id="radio7y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio7" value="No" id="radio7n" />
 
            No</label>
 
      </span></p>
 
      <p class="style2"><span class="style3">
 
        <label>Do you have issues locating keys on your keyboard?</label>
 
        
 
<label id="lblFname" for="radio8"><input type="radio" name="radio8" value="Yes" id="radio8y" /> 
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio8" value="No" id="radio8n" />
 
            No</label>
 
      </span></p>
 
      <p class="StoryContentColor style2 style3"><span class="style2">
 
        <label>Do you need to take notes during meetings away from your desk 
            and/or in training sessions?</label>
 
        
 
        <label id="lblFname" for="radio9"><input type="radio" name="radio9" value="Yes" id="radio9y" />
 
            Yes</label>
 
        <label>
 
        <input type="radio" name="radio9" value="No" id="radio9n" />
 
            No</label>
 
      </span></p></td>
 
    </tr>
 
    
 
    <tr style="vertical-align: top">
 
      <td style="width: 722px">        
 
     <input type="submit" id="btnSubmit" name="btnSubmit" value="Submit" />
 
     <input type="reset" id="btnReset" name="btnReset" value="Reset" />
 
            </td>
 
    </tr>
 
  </table>
 
  
 
  </form>
 
 
 
 
</body>
 
</html>
 
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:

Select allOpen in new window

 

by: hieloPosted on 2008-02-16 at 14:46:46ID: 20911658

If you don't set the correct value on action this will not work. For the sake of clarity, let's say that the page you posted above can be accessed from a webrowser by going to http://www.yoursite.com/myScripts/testEmail.asp. Then in the action attribute of the form you will need:
<form action="/myScripts/testEmail.asp"...>

If you look closely it is the complete url MINUS the domain (http://www.yoursite.com). I am seeing this on your last post:
<form action="/508/wizard.asp">

which means that:
1. The code on your last post better be from a file named wizard.asp because what I gave you originally was a self-posting script.

2. you should be able to type this directly into the browser:
http://www.yoursite.com/508/wizard.asp

and get the "blank form" the first time you get to the page. When you submit it will send the data to itself (hence self-posting), and when it detects that you actually submitted data to it, it will then proceed to send the email.

Having gotten that out of the way, "the page cannot be displayed" reveals nothing about the nature of the error. An error line or a server-generated error description is more helpful. I can't help you more from what you provided.

 

by: PlatiniPosted on 2008-02-27 at 12:10:27ID: 31430340

Thank you again hielo!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...