Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jan 2004
    Location
    undefine
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sos!how to transfer to other page in a showModalDialog window

    I want to transfer to other page ,because i have some db operate to do ,but showModalDialog window open a new,how should i do?
    undefine

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here's one way (if I understand what you're asking):

    Caller:
    ------------------------------------
    <html>
    <head>
    <title>Caller Document</title>

    <script type="text/JScript">

    function showDialog(dialogLocation){

    showModelessDialog(dialogLocation, window);

    }
    </script>
    </head>

    <body>

    <button onclick="showDialog('dialog-1.html')">ShowDialog 1</button>

    </body>
    </html>
    ------------------------------------

    ====================================

    callee #1: (save as "dialog-1.html")
    ------------------------------------
    <html>
    <head>
    <title>dialog-1</title>

    <script type="text/JScript">

    function nextDialog(dialogLocation){

    dialogArguments.showDialog(dialogLocation);

    window.close();
    }
    </script>
    </head>

    <body>

    <button onclick="nextDialog('dialog-2.html')">ShowDialog 2</button>

    </body>
    </html>
    ------------------------------------

    ====================================

    callee #2: (save as "dialog-2.html")
    ------------------------------------
    <html>
    <head>
    <title>dialog-2</title>
    </head>

    <body>

    This is dialog-2.

    </body>
    </html>
    ------------------------------------
    hmm... ?

  • #3
    New Coder
    Join Date
    Jan 2004
    Location
    undefine
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it open two same size windows,not one.
    undefine

  • #4
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The first dialog should close itself... is that not happening?
    hmm... ?

  • #5
    New Coder
    Join Date
    Jan 2004
    Location
    undefine
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it close two windows at the same time,if you drag mouse ,you will find two windows .
    Attached Thumbnails Attached Thumbnails How to transfer to other page in a showModalDialog window-sm.jpg  
    undefine

  • #6
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, it worked for me anyway.

    So, it doesn't seem that htmlDialogs were meant to be navigable -- something to do with security, perhaps?

    You might try simulating modality with a normal window; I think there's an example in the post-a-javascript forum...
    hmm... ?

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,966
    Thanks
    0
    Thanked 236 Times in 233 Posts
    That's the behavior of modal dialogs in IE. Links and form submissions are opened in a new window.


  •  

    Posting Permissions

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