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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:54:57+00:00 2026-05-12T05:54:57+00:00

I am new to JavaScript and after reading related books for quite some time,

  • 0

I am new to JavaScript and after reading related books for quite some time, I am still confused about what is the meaning and what is the function of window.parent? Appreciate if someone could show me some simple samples to let me know what does window.parent mean? Thanks!

Here is the code I am confused, and it is a part of JavaScript code written by an ASP.NET class as a part of the response to client-side. I am especially confused about what means window.parent." + Taget + ".location = '" + url. Appreciate if anyone could make it clear.

HttpContext.Current.Response.Write("<script>window.parent." + Taget + ".location = '" + url + "?userID=" + userID + "';window.location='Title.aspx';</script>");

Thanks in advance,
George

  • 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-12T05:54:57+00:00Added an answer on May 12, 2026 at 5:54 am

    window.parent refers to a frame’s (or iframe’s) parent:

    <frameset cols="25%,75%">
       <frame src="frame_a.aspx" name="frameA" />
       <frame src="frame_b.aspx" name="frameB" />
    </frameset> 
    

    In the above example, if window.parent were executed in frame_a.aspx, it would refer to the window containing the <frameset> element.

    Target refers to either a frame (by name) or a standard target:

    • _blank – New window
    • _parent – Current frame’s parent
    • _top – Top-most frame (entire browser window/tab)

    _top and _parent only refer to different things if your frames are more than one level deep (eg. if frame_a.htm contained another frameset or iframe)

    'window.parent.' + target + '.location' is changing the URL of a frame, contained within the current frame’s parent, with the name represented by the variable target. (I have assumed taget is simply a typo).

    In my above example, if frame_a.aspx executed your example code with the target variable “frameB”, it would change the url of that frame to something else (without affecting frameA).

    Although you haven’t mentioned it, it’s possible you are using window.open and are trying to change the location on the window that opened it. In that case, you are looking for window.opener.

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

Sidebar

Related Questions

I'm still relatively new to CSS, but after lots of Stack Overflow reading, I
I'm new to JavaScript. I would like to call JavaScript / jQuery function after
New to javascript/jquery and having a hard time with using this or $(this) to
I'm new to javascript/jquery and I've done some poking around the web, but I
I started with this question: Multiple Javascript gadgets per page . After reading up
So I did some reading of the related questions and had some interesting stuff
I am trying to learn JavaScript. After reading this page: What does ':' (colon)
I'm attempting to use jQuery's autocomplete feature, and after reading several posts I still
After much googling, stackoverflowing (?) and blog-reading I still cant completely solve the issue.
Heads up: I am quite new to Javascript and have so far only written

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.