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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:39:08+00:00 2026-05-23T09:39:08+00:00

Some interesting behavior that I didn’t expect. I have a page which contains an

  • 0

Some interesting behavior that I didn’t expect. I have a page which contains an iframe, and in that iframe there’s a javascript function that redirects its own window.

I call the iframe’s js function from the parent frame. My expected behavior is that it will redirect the iframe to a new page, relative to the iframe’s existing location.

Instead, it gets redirected relative to the parent frame’s location.

You can see a demo here:

http://thedailynathan.com/files/outlink/parent/parent.html

Am I doing something wrong here, or will I just have to code in an absolute url for my redirect?

Found this thread that sounds very similar. However no one came up iwth an answer for it:

Using relative url for window.location in child iframe

  • 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-23T09:39:08+00:00Added an answer on May 23, 2026 at 9:39 am

    Change the:

    document.getElementById("myframe").contentWindow.moveMe()
    

    to:

    document.getElementById("myframe").contentWindow.location = "javascript:moveMe()"
    

    This way, the moveMe executed in the iframe’s context.

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

Sidebar

Related Questions

I have found some interesting behavior and do not know why or how to
A web site I've been using has some interesting behavior... There is a form,
Assume that you have a directory under subversion control, that contains some files and
I have some interesting problem for an hour.. In my flex project, all width
I have code which is trivial but only works in IE not Firefox. $(document).ready(function(){
I've been working on a project and came across some interesting behavior when using
I have a page that works on firefox and chrome. In IE7 i'm experiencing
I saw some interesting compiler behavior yesterday and I think I understand why it's
We have been having an interesting issue with the Eclipse update when some of
I'm seeing some interesting behavior in my program's link-local IPv6 multicast routines. It seems

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.