Re: targeting main window from popup



Joshie Surber wrote:
> > What should I give in ???? for target?
>
> window.onload = function() {
> f = document.getElementById('myform');
> f.target = window.opener;
> }
>

......Thanks for your reply. How should I call this function in the
form??

> should work. If not, since I am assuming that the form just updates
> values somewhere that will affect how the main window is displayed, you
> may just use the popup as its own target, and after it is submitted
> output:
> window.onload = function() {
> window.opener.reload();
> window.close(); // optional
> }

......I tried something like this before. This what I did:

function update_parent()
{
window.opener.reload();
window.close();
}

<form name="myform" action="run.php" method="get"
onSubmit="javascript:update_parent()">

This runs the PHP script but displays the results in popup page (not in
opener and didn't close the popup window as expected). I'm using
Mozilla and IE browsers. I close the popup window manually and have to
"refresh" the main window to see the results in main window.


function update_parent2(url)
{
window.opener.location.href=url;
window.close();
}
<form name="myform" action="run.php" method="get"
onSubmit="javascript:update_parent2('run.php')">

The javascript works fine but doesn't actually run the PHP script as
expected. I mean, the "update_parent2" replaces the main window with
specified url and closes the popup window but the user (checkbox) input
in popup form is not being used.

Any more pointers would be helpful.

TIA
Hemanth

.



Relevant Pages

  • Re: Frontpage query
    ... You need to select a target other than the default target which is ... To open your flash in a popup window while keeping your viewers on the ... flash video when someone clicks on the link I will provide. ...
    (microsoft.public.frontpage)
  • Re: PHP Session in new window
    ... In the form that submits to the popup window, ... Create a hidden field in my form with the session ID ... >> Problem is on return (successful transaction etc) I cannot access the ...
    (alt.php)
  • Re: Frontpage query
    ... You need to select a target other than the default target which is probably ... To open your flash in a popup window while keeping your viewers on the ...
    (microsoft.public.frontpage)
  • Re: Why so much emotion about IWB 2.0.5? was re: other stuff and re: IBM Web Browser v2.0.5 is here
    ... It looks like IBM has fixed some of the problems reported as fixed in Mozilla 1.7.5. ... MFSA 2005-13 "Window Injection Spoofing" is still there. ... If you don't have popups blocked, the spoofed window does open, but it opens as a popup window so it doesn't seem very serious since popup windows can display just about anything their creator wants, anyway. ... You could be a victim in this way but it looks unlikely since there would first have to be the malicious website with the bad link and then you would have to be pretty 'unwise' to enter any significant data into ...
    (comp.os.os2.apps)
  • Re: Problem with session time out
    ... > still open up the child window and the redirection to the login page was ... But i would like to redirect on the parent ... > window instead of the popup window. ...
    (microsoft.public.dotnet.framework.aspnet)