Dear All....
I searched all possible sources to find a solution to my problem and I can't find a solution to it.
I have (Page1)- Contains a form that posts information to a new page (Page2) [popup]
(Page2) contains a preview of the values entered from (Page1) and a submit button to insert the value to the database..
when the user submits the form, it is dealt locally (php self) where the page basically refers to itself and deals with the insert process.
Basically, after the data is inserted, I would like to do the following:
1. Define a "Location" variable, and an "Identification" variable to post to the opener page.
2. Redirect the opener page to another page [Page3], and receive the popup variables to it.
3. close the popup page, and focus on the opener page.
I found this command:
window.opener.document.forms['form-name'].submit()
but the problem with it is that i cannot change the location of the opener page.
It must be noted, that the location of which we want to redirect the opener page to checks to see if a certain variable is set (PHP Language: $_POST['variable1']) if this variable is not set, the page automatically redirects to another page.. so to access this page, the $_POST['variable1'] must be set so that the page can fully open.
Therefore, basically, i want javascript to change location of the opener window, and concurrently post a variable to it so that we can access the page. [basically speaking, set the target of a form to be the opener window, and the location to be a certain page where the data will be posted to]
How can that be done?
Thanks a lot for the support in advance.
Sincerely,
Sherif