Dear Bill,
I am trying to do the same thing? did you get it to work? I am also
using Cold Fusion. Could you please share your results with me?
Thank you!
Sincerely,
Trigger
> Hi,
>
> I've got a data entry form on a web page which requires the user to enter
> various codes. Some users won't be familiar with the codes so I pop-up
> another page with a list of the codes/descriptions in a table. When the
> user clicks on the description, the code & description are writen back to
> the form. The 'code' ends up in the appropriate input field while the
> description ends up next to it (in a table cell with an id tag).
> [Remember this is being executed in the pop-up window so document.opener
> is needed to reference the parent window].
>
> In IE this is working fine.... with NetScape the 'code' is OK but the
> description doesn't make it... Of course, Netscapes document model isn't
> the same as IE so that's where the problem is.... Here's the code I've
> got so far (ignore the cfoutputs - this is being generated in cold
> fusion):
>
> // copy the code over to the form field
> window.opener.document.<cfoutput>#attributes.field#</cfoutput>.value =
selection;
>
> // copy the description to the next table cell
>
> if (window.opener.document.all)
> // internet explorer
>
window.opener.document.<cfoutput>#attributes.desc#</cfoutput>.innerText
> description;
> else if (window.opener.document.layers)
> {
> // Netscape Navigator - this bit doesn't work!
> window.opener.document.layers['DistTypeDesc'].document.open();
>
> window.opener.document.layers['DistTypeDesc'].document.write('Testing');
> window.opener.document.layers['DistTypeDesc'].document.close();
>
>
window.opener.document.layers.'DistTypeDesc'].document.visibility='visible'
;
>
> }
>
> Here's a snippet from the page where the data is being sent...
>
>
<td>
>
<input type="text" name="DistTypeCode"
value="<cfoutput>#HTMLEditFormat(attributes.DistTypeCode)#</cfoutput>"
size="20"
> maxlength="4" />
> </td>
> <td>
> <a href="<cfoutput>#request.home#</cfoutput>ref/index.cfm?
fuseaction=PopUpRefCodes&Command=LIST&TableID=5&field=FilterFor
m.DistTypeCode&Title=District+Type&Desc=all.DistTypeDesc"
> target='popup' onclick="result
> window.open('','popup','height=450,width=300,scrollbars=no');
> result.focus(); "><img
src="<cfoutput>#request.image#</cfoutput>magnif4.gif" width="21"
height="21"
> border="0" alt="Select list to filter on." /></a>
> </td>
> <td id="DistTypeDesc"
class="iwuddesc"><cfoutput>#DistTypeDesc#</cfoutput> </td>
>
>
>
> Suggestions welcome! Thanks!