Solved

Manipulation location of "creator window"

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript create file issue 4 48
How to turn a javascript bookmark into a hyperlink online 9 32
jQuery not working on ELSE... why? 2 24
is this a cms? 8 35
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
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)
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now