Forum Moderators: coopster

Message Too Old, No Replies

PHP, FORM, Javascript, Opener?

         

HeadBut

4:54 pm on Jun 22, 2006 (gmt 0)

10+ Year Member



I'd like to pop-up a small window (Which I can do: see below) and set a value from the pop-up script (Which I can do: this.DataField = opener.TextField; ). Now the troublesome part, I want to use the value from the pop-up to provide the location to return the selected value after the form is submitted. The problem I have is that I can not retain the "opener.TextField" after I return from the php form submital. Is there a way to keep the object reference through the form submital process? And then through javascript return the value and of course do a window.close(); (I'm pretty sure this is a php question)... thanks

The pop-up script:
<A onClick="document.TextField =document.BDFSubmit.TextField;lookup =window.open('includes/lookup.php','blu','WIDTH=300,HEIGHT=280, directories=no,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=no,resizable=no')" style="cursor: pointer;">Data To Pop:</a><INPUT TYPE="text" NAME="TextField" SIZE=10 Value="">

siMKin

6:41 pm on Jun 22, 2006 (gmt 0)

10+ Year Member



I'm afraid i don't understand the problem fully.
what do you mean with "want to use the value from the pop-up to provide the location to return the selected value after the form is submitted." and "Is there a way to keep the object reference through the form submital process?"?

btw, it seems you are using the popup the look up a certain value (from a database?). Why not do this with ajax?

HeadBut

7:35 pm on Jun 22, 2006 (gmt 0)

10+ Year Member



yea.. The poped-up window has the value from the "opener", and it gets submitted with the form and a result comes back from php in the same poped-up window.

So, now I want to put the result in the field in the "Opener" and "close()" the poped-up window.

siMKin

11:49 pm on Jun 29, 2006 (gmt 0)

10+ Year Member



there's nothing that would prevent that from working

what is the code you're using in the popup? and what is the error-message you're getting?