Solved

Manipulation location of "creator window"

Posted on 1997-10-07
3
190 Views
Last Modified: 2013-12-03
Hi... I'm one line away from solving this. I have an index page that opens up a remote.html page which is a floating menu bar for the site. What I want to do is manipulate the location of the index page that created the creator page.
On the index.html I have the follwing code:
<pre>
    self.name = "creator";
    newWin = window.open ("remote.htm","Remote_Control",'width=155,height=156,scrollbars=0,menubar=1,toolbar=0,resizable=1,status=1');

</pre>
and in the remote.html file I have the following:

<pre>
function goTo(pageURL) {
      window.creator.location = pageURL;
}      
</pre>
and the link is as follows:
<pre>
HREF="javascript:goTo('http://www.algarrobo.cl')">
</pre>
but it says that creator does not have a property named creator.

what am I missing??
Thanks for your help.
Marcelo
0
Comment
Question by:sinner052397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:sinner052397
ID: 1271078
I figured it out!
I'm not using javascript on remote.htm. I'm just seting the target to "creator" and that's that.

Any way to get my points back?
;-)

0
 
LVL 10

Accepted Solution

by:
kollegov earned 50 total points
ID: 1271079
If you wnat to use Java Script you should use:

parent.window.location.href="http://...../newlocation.html"
0
 
LVL 6

Expert Comment

by:Holger101497
ID: 1271080
The answer kollegov proposed is WRONG... "parent" refers to the next higher frame in the "frame" hierarchy, parent.window does not make any sense...

Nice to hear that you found an easy solution that is probably best in this situation. Just in case you would like to know (maybe you need it for some other problem), the problem with your code was that the window that opened a window is not referred to by "creator" (and you cannot easily refer to windows by their names either :-(( ). Use the "opener" property of your remote_control instead. It points to the window that opened it, i.e. your main window. You can then set window.opener.location.href="whatever.html".
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question