Hello,
   I am new at coldfusion and am having trouble posting a simple
 employment application. As much as I have analyzed this, I can't seem to see
 my error. I would greatly appreciate any and all help.

<cfif isDefined('form.submitEmploymentApplication')>
        <cfsavecontent variable="emailToSend">
                <cfoutput>
                        <table width="100%" cellpadding="3" cellspacing="0" 
border="0">
                                <tr>
                                        <td width="160"><font face="arial" 
size="2"><strong>First
 Name:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.firstName)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial" 
size="2"><strong>Last
 Name:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.lastName)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>Address:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.address)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>City:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.city)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>State:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.state)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>Zip:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.zip)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>Telephone:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.telephone)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial" 
size="2"><strong>Evening
 Phone</strong></font></td>
                                        <td><font face="arial"
 size="2">#trim(form.phone_night)#</font></td>
                                </tr>
                                
                                <tr>
                                        
                                        <td width="160"><font face="arial" 
size="2"><strong>Email
 Address:</strong></font></td>
                                        <td><font face="arial"
 size="2">#trim(form.emailAddress)#</font></td>
                                </tr>
                                <td width="160"><font face="arial"
 size="2"><strong>Occupation</strong></font></td>
                                        <td><font face="arial"
 size="2">#trim(form.occupation)#</font></td>
                                </tr>
                                </tr>
                                <td width="160"><font face="arial"
 size="2"><strong>Clubs/Affiliations</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.clubs)#</font></td>
                                </tr>
                                </tr>
                                <td width="160"><font face="arial" 
size="2"><strong>PTA/School
 groups etc involvement</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.pta)#</font></td>
                                        <tr>
                                        <td width="160"><font face="arial" 
size="2"><strong>Time to
 devote:</strong></font></td>
                                        <td><font face="arial"
 size="2">#trim(form.devote_time)#</font></td>
                                        
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>Strengths</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.strengths)#</font></td>
                                </tr><tr>
                                        <td width="160"><font face="arial" 
size="2"><strong>Best Time to
 Reach You:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.bestTime)#</font></td>
                                </tr>
                                <tr>
                                        <td width="160"><font face="arial" 
size="2"><strong>Would like
 some help with:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.help)#</font></td>
                                </tr>
                        <tr>
                                        <td width="160"><font face="arial"
 size="2"><strong>Intentions/Expectations and questions:</strong></font></td>
                                        <td><font face="arial" 
size="2">#trim(form.final)#</font></td>
                                </tr>   
                                                        </table>
                </cfoutput>     
        </cfsavecontent>
        <cfmail to="[EMAIL PROTECTED]" bcc="[EMAIL PROTECTED]"
 from="[EMAIL PROTECTED]" subject="Online Employment
 Application" type="html" server="smtp.atl.cbeyond.com"
 username="[EMAIL PROTECTED]"
 password="info1">#trim(variables.emailToSend)#</cfmail>
        <p align="center"><font face="arial" size="2"><strong>Your Application
 has been received successfully!</strong></font></p> 
<cfelse>
        <cfsavecontent variable="employmentRequestForm">
                <script>
                        function isEmail(theValue)      {
                                var emailRegex=/^\w+([\.-]?\w+)[EMAIL 
PROTECTED]([\.-]?\w+)*(\.\w{2,})+$/;
                                return emailRegex.test(theValue);
                        }
                        function checkEmploymentRequestForm(theForm)    {
                                
if(!document.forms[theForm].firstName.value.length)     {
                                        alert('Please enter your First Name!');
                                        
document.forms[theForm].firstName.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].lastName.value.length)       {
                                        alert('Please enter your Last Name!');
                                        
document.forms[theForm].lastName.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].address.value.length)        {
                                        alert('Please enter your Street 
Address!');
                                        document.forms[theForm].address.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].city.value.length)   {
                                        alert('Please enter your City!');
                                        document.forms[theForm].city.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].state.value.length)  {
                                        alert('Please enter your State!');
                                        document.forms[theForm].state.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].zip.value.length)    {
                                        alert('Please enter your Zip!');
                                        document.forms[theForm].zip.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].telephone.value.length)      {
                                        alert('Please enter your Telephone 
Number!');
                                        
document.forms[theForm].telephone.focus();
                                        return false;
                                        } else 
if(!document.forms[theForm].occupation.value.length)     {
                                        alert('What is your current 
occupation?);
                                        
document.forms[theForm].occupation.focus();
                                        return false;
                                        } else 
if(!document.forms[theForm].phone_night.value.length)    {
                                        alert('Please enter your envening phone 
number);
                                        
document.forms[theForm].phone_night.focus();
                                        return false;
                                        } else 
if(!document.forms[theForm].clubs.value.length)  {
                                        alert('Please enter any involvement in 
clubs etc');
                                        document.forms[theForm].clubs.focus();
                                        return false;
                        } else if(!document.forms[theForm].pta.value.length)    
{
                                        alert('Any involvement in PTA, 
schoolgroups etc?');
                                        document.forms[theForm].pta.focus();
                                        return false;           
                                } else 
if(!document.forms[theForm].devote_time.value.length)    {
                                        alert('Please enter your Telephone 
Number!');
                                        
document.forms[theForm].devote_time.focus();
                                        return false;                           
        
                        } else 
if(!document.forms[theForm].strengths.value.length)      {
                                        alert('Please enter your Telephone 
Number!');
                                        
document.forms[theForm].strengths.focus();
                                        return false;                           
                        
                                        
                                } else
 
if(!document.forms[theForm].emailAddress.value.length||!isEmail(document.forms[theForm].emailAddress.value))
   {
                                        alert('Please enter your Email 
Address!');
                                        
document.forms[theForm].emailAddress.focus();
                                        return false;
                                        } else 
if(!document.forms[theForm].help.value.length)   {
                                        alert('Please enter your envening phone 
number);
                                        document.forms[theForm].help.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].bestTime.value.length)       {
                                        alert('Please enter the Best Time for 
us to Reach You!');
                                        
document.forms[theForm].bestTime.focus();
                                        return false;
                                } else 
if(!document.forms[theForm].final.value.length)  {
                                        alert('Please enter your envening phone 
number);
                                        document.forms[theForm].final.focus();
                                        return false;
                                } else {
                                        return true;
                                }
                        }
                </script>
        </cfsavecontent>
        <cfhtmlhead text="#trim(variables.employmentRequestForm)#">
        <cfoutput>
                <table width="100%" cellpadding="3" cellspacing="1" border="0"
 bgcolor="##cccccc">
                        <tr>
                                <td><font face="arial" 
size="2"><strong>Employment
 Application</strong></font></td>
                        </tr>
                        <form action="#cgi.script_name#?pageID=#url.pageID#" 
method="post"
 name="employmentRequestForm" onsubmit="return
 checkEmploymentRequestForm(this.name)">
                                <tr style="background-color: ##ffffff">
                                  <td>
                                                <table width="101%" 
height="784" border="0" cellpadding="3"
 cellspacing="0">
                                                        <tr class="text">
                                                                <td 
width="102">First Name:</td>
                                                                <td width="174">
                                                                        <img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field">
                                                          &nbsp;
                                                          <input type="text" 
name="firstName" class="text" style="width:
 140px" /></td>
                                                            <td width="61">Last 
Name:</td>
                                                            <td 
colspan="2"><img src="../assets/images/required.gif"
 width="10" height="10" alt="Required Field" />
                                                  <input type="text" 
name="lastName" class="text"
 style="width: 140px" /></td>
                                                        </tr>
                                                        <tr class="text">
                                                                <td 
width="102">Address:</td>
                                                                <td>
                                                                        <img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field">
                                                                        &nbsp;
                                                          <input type="text" 
name="address" class="text" style="width:
 140px">                                                                </td>
                                                            <td>City:</td>
                                                      <td colspan="2"><img 
src="../assets/images/required.gif"
 width="10" height="10" alt="Required Field" />
                              <input name="City" type="text"
 class="text" id="City" style="width: 140px" size="4" /></td>
                                                        </tr>
                                                        <tr class="text">
                                                          <td>State:</td>
                                                          <td><img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field" /> &nbsp;
                              <input name="State" type="text"
 class="text" id="State" style="width: 140px" /></td>
                                                          <td>Zip:</td>
                                                          <td width="171"><img 
src="../assets/images/required.gif"
 width="10" height="10" alt="Required Field" />
                              <input name="Zip" type="text"
 class="text" id="Zip" style="width: 140px" size="4" /></td>
                                                      <td 
width="132">&nbsp;</td>
                                                  </tr>
                                                        <tr class="text">
                                                                <td 
width="102">Telephone:</td>
                                                          <td>
                                                                        <img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field">
                                                                        &nbsp;
                                                                        <input 
type="text" name="telephone" class="text" style="width:
 140px">
                                                          <label></label></td>
                                                          <td>Phone (Evening)
                              <label> </label></td>
                                                          <td><img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field" />
                                                      <input name="Phone 
(Evening)" type="text" class="text"
 id="Phone (Evening)" style="width: 140px" size="4" /></td>
                                                          <td>&nbsp;</td>
                                                        </tr>
                                                        
                                                        <tr class="text">
                                                                <td 
colspan="2">Best Time to Reach You:
                                                      <img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field" /> &nbsp;
                                                      <input name="radiobutton" 
type="radio" value="radiobutton"
 />
                                                      AM 
                                                      <input name="radiobutton" 
type="radio" value="radiobutton"
 />
                                                      PM</td>
                                                            <td>Email 
Address:</td>
                                                            <td><img 
src="../assets/images/required.gif" width="10"
 height="10" alt="Required Field" />
                              <input name="Email Address" type="text"
 class="text" id="Email Address" style="width: 140px" size="4" /></td>
                                                            <td>&nbsp;</td>
                                                        </tr>
                                                        <tr class="text">
                                                          <td>Occupation</td>
                                                          <td 
colspan="4"><label>
                                                            <input 
name="occupation" type="text" id="occupation" />
                                                          </label></td>
                                                  </tr>
                                                        <tr class="text">
                                                          <td 
colspan="5"><p><strong>Clubs, Organizations, Professional
 Affiliations, Please List</strong>:<label>
                                                        <textarea name="clubs" 
cols="100" id="clubs"></textarea>
                                                        </label>
</p>                                                  </td>
                                                  </tr>
                                                        <tr class="text">
                                                          <td 
colspan="5"><p><strong>Briefly describe any involvement
 you've had with local PTA's, school groups, sports leagues, youth groups
 and fundraisers.</strong><br />
                                                              <label>
                                                                <textarea 
name="pta" cols="100" id="pta"></textarea>
                                                              </label>
                                                        </p>
                                                            <p><br />
                                </p></td>
                                                  </tr>
                                                        <tr class="text">
                                                          <td height="104" 
colspan="5"><strong>How much time each week
 do you plan to devote to this new opportunity?</strong><br />
                                                            <p>
                                                              <label>
                                                            <input type="radio" 
name="devote_time" value="10
 hours" />
                                                                10 hours</label>
                                                              <input 
type="radio" name="devote_time" value="40 hours" />
                                                              <label>20 
hours</label>

                                  <input type="radio"
 name="devote_time" value="30 hours" />
                                                              <label>30 
hours</label>
                                                              <input 
type="radio" name="devote_time" value="20 hours" />
                                                              <label>40 
hours</label>
                                                              <br />
                                                              <label></label>
                                                              <br />
                                                              <label></label>
                                                              <br />
                                                              <label></label>
                                                              <br />
                                                    </p>                        
                              </td>
                                                  </tr>
                                                        <tr class="text">
                                                          <td 
colspan="5"><strong>Please describe what you feel are your
 strengths:</strong><br />
                                                            <label>
                                                            <textarea 
name="strengths" cols="100"
 id="strengths"></textarea>
                                                      </label></td>
                                                  </tr>
                                                        <tr class="text">
                                                          <td height="71" 
colspan="5"><strong>What areas do you feel you
 would like some help with?</strong><br />
                                                            <label>
                                                            <textarea 
name="help" cols="100" id="help"></textarea>
                                                      </label></td>
                                                  </tr>
                                                        <tr class="text">
                                                          <td height="70" 
colspan="5"><strong>Please outline your
 intentions and expectations and/or any questions you may have:</strong><br />
                                                            <label>
                                                            <textarea 
name="final" cols="100" id="final"></textarea>
                                                      </label></td>
                                                  </tr>
                                                        <tr class="text">
                              <td height="70"
 colspan="5"><strong>Please List Your Employment History For the Last Five 
Years and Include
 Contact Information, Employment Dates, Salary and Reason For
 Leaving:</strong><br />
                                  <label>
                                  <textarea name="final" cols="100"
 id="final"></textarea>
                                </label></td>
                                                  </tr>
                                                        
                                                        <tr class="text" 
valign="top">
                                                          <td 
width="102"><input name="submitEmploymentApplication"
 type="submit" class="text" style="width: 100px" value="Submit" /></td>
                                                                <td 
colspan="4"><div align="center"><strong> NOTE:
 </strong>Please <a href="mailto:[EMAIL PROTECTED]">email </a>photo of yourself
 to our Manager. </div></td>
                                                        </tr>
                                                </table>
                                  </td>
                                </tr>
                        </form>
                </table>
        </cfoutput>
</cfif> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295958
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to