window opener

S

soup_or_power

Hi
I have a form that opens a pop-up window. The pop up window
has a form like this:

<FORM method="POST" ENCTYPE="multipart/form-data">
<INPUT class="txt" type=file name="dn_file">
<INPUT class="btn" type=submit name="upload" value="UPLOAD">
<INPUT type=hidden name="upload_popup">
[$ if $fdat{upload} $]
<TEXTAREA cols=100 rows=10> [+ $upstr +] </TEXTAREA>
[- delete $fdat{upload} -]
<INPUT class="btn" type="button" name="Process" value="PROCESS"
onClick="this.form.target=window.opener;this.form.submit()">
<INPUT class="btn" type="button" name="Cancel" value="Cancel"
onclick="window.close()">
[$ endif $]
</FORM>

When I click on the Process button I expect the form in the main window
to be submitted. But what I see is that the pop-up's form is
submitted.

Can anyone help me?
Thank you
 
G

Gérard Talbot

Danny wrote :
<FORM method="POST" ENCTYPE="multipart/form-data" target="_parent">
no need for the onclick.

Danny


opener and the reserved target keyword _parent are 2 different birds.
opener will refer to the window object (which could be a frame, a
frameset or another window) from which the open() call was made. The
_parent reserved keyword will refer to the closest frameset parent
within the frames containment hierarchy.

Gérard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top