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 3318830
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:45:10+00:00 2026-05-17T22:45:10+00:00

Using JavaScript i have the refresh button in my parent window, when i click

  • 0

Using JavaScript

i have the refresh button in my parent window,

when i click refresh button ,

i want to refresh my child window ,

window.location.href=’add_billing_order_frm.php?session_re_genrate=new

This snippet redirecting the page instead refresh ,

I thing there is a snippet like

opener.document.location.reload(true);

but this one for parent window refresh, but i want for child window wiht URL location option

function show_billing_order_form(url){
   var childWindow = window.open(url);
}

function refresh_my_child_window(){
   return childWindow.location.reload('add_billing_order_frm.php');
}

To open a popup window(child window) , i used this show_billing_order_form call back ,

To refresh the child window , i add one refresh icon in my parent window , To refresh the child window , in that refresh icon onclick i called refresh_my_child_window ,

but function refreshing my child window..

  • 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-17T22:45:11+00:00Added an answer on May 17, 2026 at 10:45 pm

    When opening your child window from the parent, remember the return value in a variable somewhere:

    var childWindow = window.open(/* ... */);
    

    …and when you want to refresh the child:

    childWindow.location.reload();
    

    Note that some browsers will prevent access to childWindow.location.reload if the parent and child aren’t loaded from the same origin.

    Here’s a quick-and-dirty example (live copy — note: the live copy only works in non-edit mode, like the link given, because otherwise JSBin uses null.jsbin.com instead of output.jsbin.com and so the origin doesn’t match):

    HTML:

    <input type='button' id='btnOpen' value='Open Child'>
    <input type='button' id='btnClose' value='Close Child'>
    <input type='button' id='btnRefresh' value='Refresh Child'>
    

    JavaScript:

    (function() {
        var childWindow;
    
        document.getElementById('btnOpen').onclick = openChildWindow;
        document.getElementById('btnClose').onclick = closeChildWindow;
        document.getElementById('btnRefresh').onclick = refreshChildWindow;
    
        function openChildWindow() {
            if (childWindow) {
                alert("We already have one open.");
            } else {
                childWindow = window.open(location.protocol + "//" + location.host + "/cotokijigu/1");
            }
        }
    
        function closeChildWindow() {
            if (!childWindow) {
                alert("There is no child window open.");
            }
            else {
                childWindow.close();
                childWindow = undefined;
            }
        }
    
        function refreshChildWindow() {
            if (!childWindow) {
                alert("There is no child window open.");
            } else {
                childWindow.location.reload();
            }
        }
    })();
    

    Caveat: I would never recommend hooking up event handlers with onclick properties as above. Instead, I’d use addEventListener (on standards-based browsers) or attachEvent (on IE), by using a library or a utility function like this one. Used the properties above to avoid obscuring the main point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to close parent window in Firefox 2.0 using JavaScript. I have
Is it possible to refresh parent page from child's child page using javascript. I
I have been programming using PHP, Javascript and have been a designer for a
I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the
I've been using javascript for a while, but have never learned the language past
I am creating a large table dynamically using Javascript. I have realised the time
I have a <select>. Using JavaScript, I need to get a specific <option> from
Does anyone know how to resize images proportionally using JavaScript? I have tried to
Have you tried using straight javascript (rather straight ECMAscript 3 standard) in Flex applications,
I've been using various javascript frameworks including mootools, jquery, prototype and scriptaculous and have

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.