I have tried several different thigs which did not work, so I decided to do a total edit to show some f the work I have done and go more in depth with what I am trying to accomplish. However, I will still keep it short so you guys don't have to sift through so much code
Basically, I have two different CFM's (Code1.cfm and Code2.cfm). Essentially I need to get some variables that are entered into text blocks from Code1.cfm into a specific area in Code2.cfm.
Code1.cfm code:
<table>
<tr>
<td>Full Name:</td>
<td>
<input type="text" label="FirstName" value="#FirstName#" name="FirstName">
</td>
<td>
<input type="text" label="LastName" value="#LastName#" name="LastName">
</td>
</tr>
<tr>
<td>
<unput type="submit" name="btn_Update" value="Update"
onclick="return confirm('Are you sure you want to update your selection?')">
</td>
</tr>
<tr>
<td>
<IFrame id="sugg" name="NoteForm" width="745" height="205" src="Form2.cfm"></IFrame>
</td>
</tr>
</table>
<FORM action="form2.cfm" method="post" target="Notes">
<CFIF IsDefined("FirstName") OR IsDefined("LastName")>
<cfoutput>
The Full Name has been changed to #form.FirstName# #form.LastName#.
</cfoutput>
</CFIF>
</FORM>
Code2.cfm code:
<FORM>
<TABLE width="670" background="/Index_MAB/_Images/CCT_Backdrop.jpg">
<TR style="font: 8pt tahoma; color: 000066" background="/Index_MAB/_Images/CCT_Backdrop.jpg">
<TD align="left" width="498" valign="top"><textarea style="font: 8pt verdana; color: 000000; background-color:F7F5F0" name="Eng_Notes2" cols=75 rows=10 wrap="VIRTUAL" >
#HtmlEditFormat(Eng_Notes)#
</textarea></TD>
<TD align="left" width="80" valign="top">
<CFIF #Date_LastUpdate# IS NOT ''>
<FONT color="FF0000">Updated:</FONT><BR> #DateFormat(Date_LastUpdate, 'dd-mmm-yy')#
<CFELSE>
<FONT color="003366">Entered:</FONT><BR> #DateFormat(DateofEntry, 'dd-mmm-yy')#
</CFIF>
</TD>
<TD align="left" width="110" valign="top">
<input type="submit" name="btn_updnote" value=" Update " style="font: 7pt verdana; color: CC0000;" ONCLICK="return confirm('You are about to Update this NOTE - are you sure?')">
</TD>
<TD width="2%"></TD>
</TR>
</CFOUTPUT>
</TABLE>
</FORM>
<FORM>
<TABLE width="670" background="/Index_MAB/_Images/CCT_Backdrop.jpg">
<TR style="font: 8pt tahoma; color: 000066" background="/Index_MAB/_Images/CCT_Backdrop.jpg">
<TD align="left" width="498" valign="top">
<TEXTAREA STYLE="font: 8pt verdana; color: 000000; background-color: F3F8F7" NAME="Eng_Notes" COLS=75 ROWS=2 WRAP="virtual"></TEXTAREA>
</TD>
<TD align="left" width="110" valign="top">
<input type="submit" name="btn_addnote" value=" Enter " style="font: 8pt verdana; color: 003399;" ONCLICK="return confirm('You are about to Add a NOTE - are you sure?')">
</TD>
<TD width="2%"></TD>
</TR>
</TABLE>
</FORM>
This whole thing is set up to where people can enter in notes as they feel and they type those comments into the second Text Area on Code2.cfm. When they are submited it is displayed in the first Text Area on Code2.cfm. I am trying to get the first Text Area on Code2.cfm to still continue to display the #HtmlEditFormat(Eng_Notes)# as it has been as well as display this automatic blanket statement about the Names being updated when they are done so by the user.
I hope this makes sense. I am trying to give you guys as much information as possible while not using useless code and still reamining discreet per the customer.
forgot to mention one thing. I have tried the format #form.FirstName# as well as #HtmlEditFormat('FirstName') and also session (which I may be doing incorrectly), and all I get is the comments that have already been made to display. None of the comments involving the updated name.
Edit
So I have made some progress, and it was not using the method I set out to, but by easier means.
When I asked this question I did not have acces to the database so I was not able to view the variables to make it happen through SQL, but just so happens I happen to get the permissions before I could figure out a way to do it any other way.
Anyway, I set the note I was trying to apply to the other textarea by using another textarea in the first form form for Example
Addition to Form1.cfm
<textarea name="new_name" style="visibility:hidden">The first and last name has been updated>
Then I made an insert statement for SQL to put the variable new_name where I needed it which so happens to be in the Eng_Note so that it can be displayed in the text area on the second form (form2.cfm)
I am still having 2 problems. The way it is set now it will update in the database everytime the form is submitted, which as you can see could lead to a memory issue, so therefore I need to make it to where it will only be submitted if the First and Last Name are updated? Also is it even possible for me to put variables from the database into the first textarea?
<textarea name="new_name" style="visibility:hidden">The first and last name has been updated>
I would like for it to be displayed in there like I had originally stated.Any help would be much appreciated.
form2.cfm? - Matt Busche