SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Parent launches child window, window sends to another, now I want this relative to...

    redirect the orginal parent.

    any ideas?

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm...cute formatting & all, but - could have been a little more descriptive.
    ...window sends to another, now I want this relative...
    Give it another shot.
    ::: certified wild guess :::

  3. #3
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adios
    Hmm...cute formatting & all, but - could have been a little more descriptive.Give it another shot.
    hehe,
    sorry.

    i have a webpage, that opens a child window via window.open, this window performs some tasks, then it redirects -- via asp -- to another window.

    in the final window when you close it, a dialog box opens asking if you want to save...once you set your choice, I'd like for the original parent window to redirect to another page.

    any ideas? adios.

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Getting warmer. Every single detail in cases like this can be critical. Like...
    ...in the final window when you close it, a dialog box opens asking if you want to save...
    So there's a form in the pop-up's redirect page, and you're using window.onunload to prompt for a save on exit?

    Always helps to say 'window' for windows, and 'pages' (documents, files, whatever) for - pages. I will stop now.
    ::: certified wild guess :::

  5. #5
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adios
    Getting warmer. Every single detail in cases like this can be critical. Like...So there's a form in the pop-up's redirect page, and you're using window.onunload to prompt for a save on exit?

    Always helps to say 'window' for windows, and 'pages' (documents, files, whatever) for - pages. I will stop now.
    window 1 --> opens another window, performs tasks then redirects via asp --> 2nd window. which displays info. onUnload, this windows pops open a confirm() and asks if you want to save. after all of this, i'd like to have window 1 send to another page.

  6. #6
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I have a headache.
    Try this...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
        "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    <head>
    <title>untitled</title>
    <script type="text/javascript">
    
    var datasaved = false;
    
    onunload = function()
    {
    	var bSave = false;
    	if (!datasaved)
    		bSave = confirm('Save data?');
    	if (opener && !opener.closed)
    		opener.location = 'redirect_url';
    	if (bSave)
    		document.forms[0].submit();
    	self.close();
    }
    
    </script>
    </head>
    <body>
    <form action="cleopatra.asp" onsubmit="datasaved=true">
    <input />
    <input type="submit" value="Save data" />
    </form>
    </body>
    </html>
    ::: certified wild guess :::


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •