473,243 Members | 1,626 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,243 software developers and data experts.

ASP form problem: Mailing Failed... Error is: FromAddress Property cannot be blank

Hi everyone,
I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can select which department they will send the form to (we are trying to consolidate forms). This is what I have so far, but when I test the form, I keep getting this error message:
Mailing Failed... Error is:
FromAddress Property cannot be blank.

You can view/test the live form here:
http://myweb.twu.edu/~bklug/ask_test.htm

Any help is greatly appreciated.


Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <script> 
  3. function formProcess(form1) 
  4.  /* More than 1 elm with name, so a collection is returned */ 
  5.  var elms = form.elements.recipientmail, selected; 
  6.  for(var k=-1, elm; elm=elms[++k];){ 
  7.   if(elm.checked) 
  8.    selected = elm; 
  9.  } 
  10.  
  11. /* If selected remains undefined (ie no selection made) */
  12. if(!selected){
  13. alert("Please select department");
  14. return false;
  15. }
  16. /* Else set action; allow submit */
  17. form.action = "mailto:"+selected.value;
  18. return true;
  19. }
  20. // bklug@mail.twu.edu
  21. </script>  <script>
  22. // JavaScript Document
  23.  
  24. /* This script and many more are available free online at
  25. The JavaScript Source!! http://javascript.internet.com
  26. Created by: wsabstract.com | http://www.wsabstract.com */
  27. function checkrequired(which) {
  28.   var pass=true;
  29.   for (i=0;i<which.length;i++) {
  30.     var tempobj=which.elements[i];
  31.     if (tempobj.name.substring(0,8)=="required") {
  32.       if (((tempobj.type=="text"||tempobj.type=="textarea")&&
  33.           tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
  34.           tempobj.selectedIndex==0)) {
  35.         pass=false;
  36.         break;
  37.       }
  38.     }
  39.   }
  40.   if (!pass) {
  41.     shortFieldName=tempobj.name.substring(8,30).toUpperCase();
  42.     alert("The "+shortFieldName+" field is a required field.");
  43.     return false;
  44.   } else {
  45.   return true;
  46.   }
  47. }</script> 
  48. </head>
  49.  
  50. <body>
  51. <h2>Ask a Librarian</h2>
  52.  
  53.    <form method=post action=http://www.twu.edu/cgi-bin/aspmail.asp id=form1 name=form1 enctype="text/plain" onSubmit="return (checkrequired(this) && formProcess(this))"> 
  54.  
  55. <input type=hidden name=sendername value="Automailer">
  56. <input type=hidden name=subject value="Distance Learning Request">
  57. <input type=hidden name=recipientname value="DL">
  58. <input type=hidden name=fromaddress value="webmaster@twu.edu">
  59. <input type=hidden name=redirect value=http://www.twu.edu/library/>
  60. <input type=hidden name=userinfo value="on">
  61.  
  62.  
  63.  
  64. The more information you provide on this form, the better we can serve you.<br />
  65.  
  66.  
  67. <table width="928" border="0" bgcolor="#cccccc">
  68. <tr> <td height="30"><span class="style3">*Required Field</span>
  69.       <span class="style3"></td>
  70.     <td></td>
  71.   </tr>
  72.     <td height="30">
  73.       <span class="style3">*</span><strong>Name:</strong></td>
  74.     <td><br /><input type="text" name="requiredname" size="50" /><br><br></td>
  75.   </tr>
  76.   <tr>
  77.     <td><b><span class="style3">*</span>Your Affiliation:</b></td>
  78.     <td><br />
  79.       <input type="radio" name="status" value="Student"> Student
  80. <input type="radio" name="status" value="Faculty"> Faculty
  81. <input type="radio" name="status" value="Staff"> Staff
  82. <input type="radio" name="status" value="Other"> Other<br /><br /></td>
  83.   </tr>
  84.   <tr>
  85.     <td><b>FACULTY/STAFF ONLY:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b></td>
  86.     <td>
  87. <b><br />Department&nbsp;</b> 
  88.     <input type="text" name="department" size="35"/>
  89.  <b>&nbsp;&nbsp;Phone&nbsp;</b><input type="text" name="phone" size="35"/><br><br></td>
  90.   </tr>
  91.   <tr>
  92.     <td><b><span class="style3">*</span>Email Address :</b> </td>
  93.     <td><br /><br />    <input type="text" name="requiredemail" size="35"/><br>
  94.     <i>Your email address MUST be accurate for us to deliver information to you.</i><br /><br /></td>
  95.   </tr>
  96.   <tr>
  97.     <td height="62"><span class="style3">*</span><b>My question is about: </b></td>
  98.     <td>
  99. <input type="radio" name="recipientmail" id="addr0" value="bklug75@gmail.com"><label for="addr0">Register for Library Services</label><br />
  100. <input type="radio" name="recipientmail" id="addr1" value="bklug@mail.twu.edu"><label for="addr1">Research Paper</label><br />
  101. <input type="radio" name="recipientmail" id="addr2" value="bklug75@yahoo.com"><label for="addr2">Classroom Assignment</label>
  102. <br />
  103. <input type="radio" name="recipientmail" id="addr3" value="bklug75@gmail.com"><label for="addr3">Reporting Connection Trouble 
  104. to Databases</label><br />
  105. <input type="radio" name="recipientmail" id="addr4" value="bklug@mail.twu.edu"><label for="addr4">Distance Learning Services</label><br />
  106. <input type="radio" name="recipientmail" id="addr5" value="bklug75@yahoo.com"><label for="addr5">Women's Collection, Cookbook Collection, University Archives</label><br />
  107. <input type="radio" name="recipientmail" id="addr6" value="bklug75@gmail.com"><label for="addr6">WASP/Women's Airforce Service Pilots</label><br />
  108. <input type="radio" name="recipientmail" id="addr7" value="bklug@mail.twu.edu"><label for="addr7">Suggest a Purchase</label><br />
  109. <input type="radio" name="recipientmail" id="addr8" value="bklug75@yahoo.com"><label for="addr8">Personal Interest</label><br />
  110. <input type="radio" name="recipientmail" id="addr9" value="bklug75@yahoo.com"><label for="addr9">Other</label></td></tr>
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.      <tr>
  127.     <td height="62">
  128.  
  129. <b><span class="style3">*</span>Ask your brief question here<br /> (in 50-75 words or less): </b> <br /></td>
  130.     <td> <textarea name="requiredcomments" rows="9" cols="50" wrap="virtual"></textarea><br><br>                 
  131.  
  132.  
  133.  
  134.  
  135.  
  136.           <input type="submit" value="Submit request"  /></td>
  137.   </tr></table>
  138.    </form>
Jul 16 '07 #1
0 2150

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
6
by: BUX | last post by:
If I try to read MyControl.text I receive Run-Time error 2185 that means about < Impossible to refer to a property or a metod if the control is not active >. But this happen only if the form...
9
by: Tris | last post by:
Hi People I need help!!! Have got a excel file that i have put into an access file so that i can create a mailing carrier sheet without re typing everybodys details in. The excel file has...
2
by: Cerebral Believer | last post by:
Hi folks, Can anyone help me with this form: http://futurebydesign-music.com/_member/club_fbd_reg.php I have followed to coding instructions aas closely as I can, but I am getting errors...
2
tolkienarda
by: tolkienarda | last post by:
hi all i've been beating my brains out on my moniter because i cant figure out what is wrong with my code. what i am doing is checking input from a form to make sure it is accurate and if it isn't...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
2
ak1dnar
by: ak1dnar | last post by:
Hi, please help me on this. Here i am having a simple form that consist with name and email fields and both are required fields. i am going to validate this inputs using validate.php. but since i...
6
by: Tomino | last post by:
Hi, I am working on a log in form for an Access 2003 db. Because the built-in jet database engine doesn't supply the ability to record every log attempt, failed attempt, validate passwords, user...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.