Solved

Manipulation location of "creator window"

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
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 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…

746 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

14 Experts available now in Live!

Get 1:1 Help Now