473,738 Members | 8,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

3 New Member
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 2178

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

Similar topics

25
10256
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
14
10142
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 I should give back to the community by posting our findings. Thanks you all for all your help till now by posting problems and their solutions. ~Abhijit
6
3171
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 have no record and ALLOWADDITION is set to FALSE. Do you know in this case how can I get MyControl.text ? thank you
9
1577
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 some blank spaces within it for example: Mr A Smith
2
1947
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 about not filling in all the fields on the form correctly when I test it. Is validating a form with radio buttons difficult?
2
1388
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 then i print a new table row and tell the people which fields they need to change and apperently i am too stupid to figure this out (mabey cause my brains are scattered accross my office.) anyway code section one form valiadation on remote php...
7
9661
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 operation on parameters not passed. Example: Make a TST.asp and post to it as TST.asp?STATE=TEST <%@ Language=JavaScript %> <%
2
3076
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 am since i am using responseText object i couldn't display the error message for corresponding fields. That means if name is blank error should appers in <span id="output_name"> if email is blank error should appers in <span id="output_email"> ...
6
2563
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 lock after X failed log attempts, ... I desided to program one of my own. The code itselves works fine but I cannot write the value of intLogonAttempt to tbl_users, I would like to lock the user after 3 failed log attempts, and made a field called...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.