Can the same methodology be used to update a frame and/or frames from a
pop-up window?



-----Original Message-----
From: Gary Groomer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 11:03 AM
To: CF-Talk
Subject: Re: Updating a form from a pop up window


Steve,

I just went through this for a shopping cart that I developed.  Here is the
code that I used.

<!-- Post Form Data from PopUp Window to Frame and Close PopUp -->
<SCRIPT TYPE="text/javascript">
<!--
// Link the Popup Window Back to the Opener
function targetopener(mylink, closeme, closeonly)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
if (! closeonly)window.opener.location.href=mylink.href;
if (closeme)window.close();
return false;
}
//-->
</SCRIPT>

<!-- Post Form Data by Page Name and Frame Name and Close PopUp Window -->
<form action="../dsp_footer.cfm" target="footer" method="post">
 <input type="IMAGE" src="images/addtoc.gif" border=0
onClick="javascript:window.close();">
</form>

I hope it helps, Gary Groomer
----- Original Message -----
From: "Steve Powell" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 7:36 AM
Subject: Updating a form from a pop up window


> Hi guys
>
> I'm building a content control system where new products are added or
updated
> via a form. I want the users to be able to upload images. I'm storing the
image
> name in the DB along with the other porduct details.
>
> The plan is to use a sub window whihc allows the users to upload a new
image
> using CFFILE and then retrive the filename with the serverFile param.
>
> I wonderd if there were any quick ways of updating the master form with
the new
> image name. I'm guessing the answer is some Javascript and DHTML. I
suppose I'd
> better also set the value of a hidden control and then pass that along
with the
> regular text inputs to the action page whihc will insert/update the DB?
>
> And I hate debugging JavaScript.
>
> Anyone have any better ideas?
>
> regards
>
> Steve
>
>
> Steve Powell
> 07971 583 792
> [EMAIL PROTECTED]
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>


______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to