Web Analytics Made Easy -
StatCounter How to transfer to other page in a showModalDialog window - CodingForum

Announcement

Collapse
No announcement yet.

How to transfer to other page in a showModalDialog window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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... ?

    Comment


    • #3
      it open two same size windows,not one.
      undefine

      Comment


      • #4
        The first dialog should close itself... is that not happening?
        hmm... ?

        Comment


        • #5
          it close two windows at the same time,if you drag mouse ,you will find two windows .
          Attached Files
          undefine

          Comment


          • #6
            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... ?

            Comment


            • #7
              That's the behavior of modal dialogs in IE. Links and form submissions are opened in a new window.
              Glenn
              vBulletin Mods That Rock!

              Comment

              Working...
              X