Solved

Manipulation location of "creator window"

Posted on 1997-10-07
3
179 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
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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 …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

777 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