Jump to content

Change parent URL from child


cmattoon

Recommended Posts

I know this has to be a really simple function, but it's totally escaping me today.

 

I want to open a child window, find a result then change the parent's URL to the previous URL, plus a ?result=

 

Example:

 

parent.php is accessed (URL: "parent.php?foo=bar"). User clicks a link, which opens up a new window, and refreshes the parent window to: "parent.php?foo=bar&result=myresult"

 

(parent.php can be accessed by a couple pages, where RESULT would be filled out, but if it's accessed alone, it needs to have the result paramater selected)

 

Thanks!

 

 

 

 

Link to comment
Share on other sites

It sounds like what you are looking for is actually AJAX. Instead of opening a new window to return a result, you could send the request via a XMLHttpRequest object and change the location based on the result. Is there a specific reason that it needs to be in a new window? Maybe you could show some code.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.