Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6362011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:51:08+00:00 2026-05-24T23:51:08+00:00

I want to open a new window when the user fills an input, then

  • 0

I want to open a new window when the user fills an input, then he’ll choose something from the opened window(the selected values will be in the form of an array) and then when he’s done to close the new window, get the values array back in the first page and fill the next section of the form with those values.

This is something like Twitter’s authorize page, the question is how can I pass the variable back to the initial page?

Many thanks

UPDATE:
I found this to change the value of a form input in the window that opened it. I don’t want to redirect or anything, just to capture a value and then close the pop-up.

window.opener.document.getElementById('searchText').value='something';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:51:08+00:00Added an answer on May 24, 2026 at 11:51 pm

    Use the window.opener object

    Example, you can set the location (redirect) the parent window from the pop up window

    <script type='text/javascript'>
      function redirect(){
        window.opener.document.location = 'Newurl.html';
      }
    </script>
    
    <a href='javascript:void(0);' onclick='javascript:redirect()'>Redirect the window opener</a>
    

    To set a value of a field inside a form you can do something like this

    <script type='text/javascript'>
      function changeVal(newVal){
        window.opener.document.getElementById('field_id').value = newVal;
      }
    </script>
    <a href='javascript:void(0);' onclick='javascript:changeVal("new value")'>Change the field value</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my struts2 application I want to open a new window when user click
I'm new to VSDO, and i want to open new template/word popup window within
I have a button: <button>Click</button> I want click it and open a new window
In my site I want to open a new window with a url .My
In one of my apps I want to open a new window/tab for a
I want to open a new window by clicking on a marker using Google
i want to open a popup window when user leaves tab or closes browser,
I want to be able to click a button and open a new form
I want open a path to vim from Screen's copy-mode by Ctrl-A f similarly
want to open pdf file when a user clicks on hyperlink shown in gridview

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.