crystalb24
Programmer
Here is the code that I'm using:
and
What I need to be able to do is control the formatting of the text populating into the textarea. In order for the populated text to be removed from the textarea when the checkbox is unchecked, the value has to be contained on one line (I figured that out through trial and error). But I need the text designated by the checkbox (in this case a outline) to populate the way it looks on the screen, as an outline. Is there any way to do this?
~Crystal
Click here ( for a free iPod
Code:
<script language="JavaScript">
function updateTextarea(cb)
{
var taValue = document.formName.textareaName.value;
if(cb.checked)
{
if(taValue != "")
taValue += " ";
taValue += cb.value; //APPENDS checked value to textarea
}//end if
else //checkbox is not checked
{
if(taValue.indexOf(cb.value) > -1)
{
taValue = taValue.replace(cb.value, "");//removes UNchecked value once
}//end if
}//end else
taValue = taValue.replace(/\s+/g, " "); //reduces multiple spaces to single spaces
if(taValue.indexOf(" ") == 0)
taValue = taValue.substring(1);
document.formName.textareaName.value = taValue;
}//end function
</script>
and
Code:
<form name="formName2" method="post" action="file:///G|/[URL unfurl="true"]wwwroot/PDGApps/AppFiles/ASPFiles/OnlineTraining/PCG/Fa_Rookie/MainMenu/Thanks.asp"[/URL] onsubmit="this.mission.value=this.textareaName.value;alert(this.mission.value);">
<input type='hidden' name='mission'>
<a name="textarea2"><TEXTAREA ROWS="10" COLS="65" name="textareaName2"></textarea></a>
<p class="style20"><i>(insert best practice examples)</i></p>
<table class="style20" width="100%">
<tr>
<td valign="top">
<input type="checkbox" onclick="updateTextarea2(this);if(this.checked)showLink(this.name);" name="checkbox3" value="FORMATTING NEEDED">
</td>
<td colspan="2">
Pre-meeting checklist
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Schedule appointment; explain process
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Send [letter/agenda/questionnaire] to client/prospect
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•<i><a href="SAMPLE DOCUMENT.doc">(insert sample meeting letters)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•<i><a href="SAMPLE DOCUMENT.doc">(insert sample agendas)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•<i><a href="SAMPLE DOCUMENT.doc">(insert sample questionnaires)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•<i><a href="SAMPLE DOCUMENT.doc">(insert sample information packets)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Request send in / bring in documents
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•<i><a href="SAMPLE DOCUMENT.doc">(insert sample document checklist)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•If sending in, follow up process
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
•If sending in, review documents
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Set up electronic & hard-copy files
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Schedule team participants for <b><font color="#cc0000">Understand
your goals</font></b> meeting
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Assemble materials needed for meeting
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
•Facilities check<div id="checkbox3Div" style="visibility:hidden"><a href="#textarea2">Click here to return to top</a></div>
</td>
</tr>
</table>
<br>
<br>
<table class="style20" width="100%">
<tr>
<td valign="top" valign="top">
<input type="checkbox" onClick="updateTextarea2(this);if(this.checked)showLink(this.name);" name="checkbox4" value="FORMATTING NEEDED">
</td>
<td colspan="3">
Agenda for <b><font color="#cc0000">Understanding Your Goals</font></b> meeting
</td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
•<i><a href="SAMPLE DOCUMENT.doc">(insert sample agendas, questionnaires, discussion questions, scripts)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
•Client goal information
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Personal information for all members of household
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Background, values and current financial situation
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Identify goals (including $ required, time horizon, etc.)
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Retirement goals
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Education funding needs
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Special purpose goals
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Liquidity needs
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Capital preservation needs
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Potential windfalls
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Advanced topics
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Lending needs
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Wealth transfer requirements
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Special planning situations
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Life and other insurance coverage needs
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•Other trusted advisors
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Client's expectations
</td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
•Client's risk information
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Discusssion of past investment experience
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Discussion of historical ranges or returns
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
•<i><a href="SAMPLE DOCUMENT.doc">(insert samples of capital markets charts)</a></i>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Discussion of financial outlook
</td>
</tr>
<tr>
<td>
</td>
<td colspan="3">
•Client's current situation
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Cash flow sources
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Liquid assets, asset allocation
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Non-liquid assets
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td colspan="2">
•Liabilities<div id="checkbox4Div" style="visibility:hidden"><a href="#textarea2">Click here to return to top</a></div>
</td>
</tr>
</table>
What I need to be able to do is control the formatting of the text populating into the textarea. In order for the populated text to be removed from the textarea when the checkbox is unchecked, the value has to be contained on one line (I figured that out through trial and error). But I need the text designated by the checkbox (in this case a outline) to populate the way it looks on the screen, as an outline. Is there any way to do this?
~Crystal
Click here ( for a free iPod