Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. window.showmodaldialog

window.showmodaldialog

Scheduled Pinned Locked Moved Web Development
tutorialhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chintan1979
    wrote on last edited by
    #1

    Hi, I am displaying a page using "window.showmodaldialog" to show some help to the user. Now I want to retrive the values selected by the user. I am using tables and tds to display the help. can any one guide me on how to get the user selection in the parent form from where this dialog is opend?? Chintan

    A 1 Reply Last reply
    0
    • C chintan1979

      Hi, I am displaying a page using "window.showmodaldialog" to show some help to the user. Now I want to retrive the values selected by the user. I am using tables and tds to display the help. can any one guide me on how to get the user selection in the parent form from where this dialog is opend?? Chintan

      A Offline
      A Offline
      Andrew Quinn AUS
      wrote on last edited by
      #2

      Hi, You can use the vArguments parameter of the showmodaldialog call. e.g.

      var myObject = new Object();
      myObject.firstName = "Andy"; // an example, you'd get these from the page probably
      myObject.lastName = "Quinn;
      window.showModalDialog("showModalDialog.htm", myObject, sFeatures);

      and in the showModalDialog.htm page:

      ...
      function onLocalLoad
      {
      var myObject = window.dialogArguments;
      var elPlaceHolder1 = document.getElementById("idSpan1");
      if (myObject && elPlaceHolder1)
      {
      // do what you need to do
      elPlaceHolder1.innerText = myObject.firstName + " " + myObject.lastName;
      }
      }

      <span id='idSpan1'></span>

      Hope this helps, Andy

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups