Ask a Question related to PHP Development, Design and Development.
-
nadia #1
can a popup window return data to parent window?
Is it possible to do the following in php:
I want to have a main form open. In the form I want a button that will
open a popup window so the user can search for something. The user can
then select what they want, and the popup window closes and the main
form (which is still open) shows the search results.
Can anyone suggest a best course of action to acheive this?
Thanks
nadia Guest
-
Insert Data into DB using a PopUp window
Hi everyone, Can someone tell me how to insert data into a databse using a Popup window. I am having problems getting it to work. Thank you. -
pdating parent window from popup....
hi All: This is the situaton.. I have a treeview with nodes in an aspx page. The node data is coming from DB. when i select a node and click add... -
Updating parent window from popup
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use... -
Refresh a parent window???
I have a frameset. left and main. Inside the main frame I have a IFRAME. I need to refresh the main frame when I post a form inside the IFRAME. I am... -
Refresh Parent window from child window causes problems
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence... -
Kevin Thorpe #2
Re: can a popup window return data to parent window?
nadia wrote:
You'll need a bit of javascript in there as well.> Is it possible to do the following in php:
> I want to have a main form open. In the form I want a button that will
> open a popup window so the user can search for something. The user can
> then select what they want, and the popup window closes and the main
> form (which is still open) shows the search results.
>
> Can anyone suggest a best course of action to acheive this?
> Thanks
The simplest way is probably to get the results page to take an optional
search parameter. All the popup has to do then is do the following:
<script language="javascript">
function search() {
var searchstring;
// get search parameters into searchstring
window.opener.location.href = 'resultspage.php?' + searchstring;
window.close();
}
<form onSubmit='search()'>
<!-- actual search form -->
</form>
Kevin Thorpe Guest
-
BKDotCom #3
Re: can a popup window return data to parent window?
Sounds like a javascript thing.
Just look for some examples for changing form values.
The only difference is you need to reference the opening window..
it'd be something like
(from the pop-up)
opener.document.forms[1].inputname.value = 'new value'; // my
javascript is terrible
??
[email]nsm38@student.cpit.ac.nz[/email] (nadia) wrote in message news:<9caa8908.0309241538.7359ae2b@posting.google. com>...> Is it possible to do the following in php:
> I want to have a main form open. In the form I want a button that will
> open a popup window so the user can search for something. The user can
> then select what they want, and the popup window closes and the main
> form (which is still open) shows the search results.
>
> Can anyone suggest a best course of action to acheive this?
> ThanksBKDotCom Guest
-
Thomas #4
Re: can a popup window return data to parent window?
suppose there is a text field with an ID as tx1 in the opener window.
You can set its value from the popup window by
opener.element.getElementByID("tx1").value = "search result";
[email]nsm38@student.cpit.ac.nz[/email] (nadia) wrote in message news:<9caa8908.0309241538.7359ae2b@posting.google. com>...> Is it possible to do the following in php:
> I want to have a main form open. In the form I want a button that will
> open a popup window so the user can search for something. The user can
> then select what they want, and the popup window closes and the main
> form (which is still open) shows the search results.
>
> Can anyone suggest a best course of action to acheive this?
> ThanksThomas Guest



Reply With Quote

