Window control
am 16.10.2007 15:37:24 von coderSay you have a window that spawns a second window (through window.open() ).
Is it possible to have a button click in the child window produce a change
in the parent window?
Say you have a window that spawns a second window (through window.open() ).
Is it possible to have a button click in the child window produce a change
in the parent window?
coder wrote:
> Say you have a window that spawns a second window (through window.open() ).
Yes, but it is seldom a good idea.
> Is it possible to have a button click in the child window produce a change
> in the parent window?
Investigate the openRemote() function. Remote control windows are
(unfortunately) quite common on the net.
"mbstevens"
news:13h9kcnad5qjk28@corp.supernews.com...
> coder wrote:
>> Say you have a window that spawns a second window (through
>> window.open() ).
>
> Yes, but it is seldom a good idea.
Here is my situation. I have an app running. There is also a pop-up window
with a list of places to call to followup sales leads. Each company on that
list is now a hyperlink that opens up the company information in that same
child window. To go to the next one, the user would have to use the back
button on the browser. I would like to have the company information appear
in the parent window when the company name is clicked in the child window
(it doesn't have to be a hyperlink). This would make for the cleanest app.
So, why is it "seldom a good idea"?
>
>> Is it possible to have a button click in the child window produce a
>> change in the parent window?
>
> Investigate the openRemote() function. Remote control windows are
> (unfortunately) quite common on the net.
Why "unfortunately"? I'll look into openRemote().
mbstevens wrote:
> Investigate the openRemote() function. Remote control windows are
> (unfortunately) quite common on the net.
>
This is not a built-in function.
Details...
.....
var remote = null;
window.name = "content";
function
openRemote(contentURL, windowName,x,y){
wh='height=' + y + 'width=' + x;
remote=window.open(zotURL,windowName,wh);
remote.focus();
}
.....
<
The control window can use calls like:
....
....
openRemote is called with stuff like:
....
....
Shelly wrote:
> "mbstevens"
> news:13h9kcnad5qjk28@corp.supernews.com...
>> coder wrote:
>>> Say you have a window that spawns a second window (through
>>> window.open() ).
>> Yes, but it is seldom a good idea.
>
> Here is my situation. I have an app running. There is also a pop-up window
> with a list of places to call to followup sales leads. Each company on that
> list is now a hyperlink that opens up the company information in that same
> child window. To go to the next one, the user would have to use the back
> button on the browser.
No, you just use either a preprocessor or server side programming
to reproduce the navigation list on each page.
> I would like to have the company information appear
> in the parent window when the company name is clicked in the child window
> (it doesn't have to be a hyperlink). This would make for the cleanest app.
> So, why is it "seldom a good idea"?
They can confuse search engines, and they are a pain for the visitor.
The little window has to come up with focus, so your visitor usually has to
reposition it. There is the matter of when to close it. If your
visitor has a pop up blocker, s/he will have to click to get the pop up.
It will be easier to just have everything your visitor needs right
in the window with the content.
"mbstevens"
news:13h9kcnad5qjk28@corp.supernews.com...
> coder wrote:
>> Say you have a window that spawns a second window (through
>> window.open() ).
>
> Yes, but it is seldom a good idea.
>
>> Is it possible to have a button click in the child window produce a
>> change in the parent window?
>
> Investigate the openRemote() function. Remote control windows are
> (unfortunately) quite common on the net.
>
When I changed the link to:
with
function go(url) {
opener.location = url;
}
in the script section, it worked like a cherm. Thank you very much.