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

  • Home
  • SEARCH
  • 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 7855289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:20:24+00:00 2026-06-02T20:20:24+00:00

From my child window Im trying to refresh the parent window. I tried several

  • 0

From my child window Im trying to refresh the parent window. I tried several js functions refresh or change the parent window url and non of them gave me what I needed.

alert(window.opener.location.href);  //gave null

//all the functions bellow changed the url to 
// http://mydomain/www.google.com
window.opener.location.assign("www.google.com");
window.opener.location.replace("www.google.com");
window.opener.location.href = "www.google.com";
window.opener.location = "www.google.com";

I also tried parent.location.href but didnt change the parent url.

Is there a way I can set the parent url to the desired url? or just let it refresh the page ?Any ideas?

EDIT
I cant post sample code because What Im doing is a bit complicated. Im using a salesforce button that calls a new window (asp.net page). I dont have much access to that page other than the .aspx page. Its a compiled version of a project we bought. In the .aspx page Im trying to call a js function because I dont have access to the code behind of that page. My js function is supposed to refresh the parent page once the user press on either (yes or no).

<cc1:ImageButton ID="btnNo" runat="server" OnClick="btnNo_Click" 
OnClientClick="pop()" Text="No" Width="40px" />



<script type="text/javascript" language="JavaScript">
    function pop(){

            window.opener.location.reload(true);
          //window.opener.location.href = "www.google.com";

    }

</script>
  • 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-06-02T20:20:25+00:00Added an answer on June 2, 2026 at 8:20 pm

    This should work:

    window.opener.location.reload(false);
    

    EDIT

    Based on your comments, it sounds like your violating the Same Origin Policy.

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

Sidebar

Related Questions

I am trying to close parent window from child window using javascript, but its
I want to change master page some label value from child page.
I'm trying to pass a variable from a child form that contains a DataGridView,
I'm trying to remove all but the first child component from a Java Container.
I am taking command line arguments to main from parent to child and counting
I have the following sample of data to insert into tables(from parent to child,
I'm trying to get a window handle on a child window in my process
I am trying to set the value to the hidden field in parent window
I'm trying to embed a window from my process into the window of an
I am trying to access values from a user control MVVM in a parent

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.