LyndonOHRC
Programmer
I have a form where the action page is a popup. I'm doing some processing and then using a cflocation tag to present the results in the child window.
The javascript I’m trying to use changes a value on the parent window using getElementById.
If I comment out the cflocation tag on the child window the process works great, however, if I populate the child with cflocation the javascript seems to never run as the parent window does not get modified.
Thank for any assistance.
Parent Window:
Action Page:
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
The javascript I’m trying to use changes a value on the parent window using getElementById.
If I comment out the cflocation tag on the child window the process works great, however, if I populate the child with cflocation the javascript seems to never run as the parent window does not get modified.
Thank for any assistance.
Parent Window:
Code:
<form name="Cards" id="Cards" method="post" action="PrintCard.cfm" target="_blank">
<input name="PageNumber" type="Hidden" value="#i#">
Sample Number: <input name="BarCode" size="10" value="#GetCard.BarCode#"><br>
Horse: <input name="Horse" size="20" maxlength="50" value="#GetCard.Horse#"><br>
<div align="center"><input type="Submit" value="Print/Save Card"> <span id="Saved#i#" style="color: red;"></span></div>
Action Page:
Code:
<cfoutput>
<cfif Trim(Form.WitnessName) gt '' and Trim(Form.WitnessBy) gt '' and Trim(Form.SampledBy) gt ''>
<script language="JavaScript" type="text/javascript">
objDiv=window.opener.document.getElementById('Saved#Form.PageNumber#');
objDiv.innerHTML='Saved';
</script>
</cfif>
</cfoutput>
Write form fields to database....
<cflocation url="ReceiptForm.cfm">
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey