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. problem -- modal dialog box

problem -- modal dialog box

Scheduled Pinned Locked Moved Web Development
helphtmltoolsquestion
2 Posts 2 Posters 2 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.
  • P Offline
    P Offline
    pushpi
    wrote on last edited by
    #1

    hi i have opened a modal dialog box using following script retSearch = window.showModalDialog('SearchCompany.aspx',oArg,'status:no;dialogHide:false;help:no;scroll:yes'); problem is when i submit SearchCompany.aspx form i get result in a new browser window , how may get the result to be in same browser window i have used target option of frame = "_self" , which is suppose to open page in same window !! any helps the dialog window works with html file ! problem occurs only when i use asp/aspx page i.e. when i submit window ! any idea whats wrong !! ? P.S. PATWAL

    B 1 Reply Last reply
    0
    • P pushpi

      hi i have opened a modal dialog box using following script retSearch = window.showModalDialog('SearchCompany.aspx',oArg,'status:no;dialogHide:false;help:no;scroll:yes'); problem is when i submit SearchCompany.aspx form i get result in a new browser window , how may get the result to be in same browser window i have used target option of frame = "_self" , which is suppose to open page in same window !! any helps the dialog window works with html file ! problem occurs only when i use asp/aspx page i.e. when i submit window ! any idea whats wrong !! ? P.S. PATWAL

      B Offline
      B Offline
      basementman
      wrote on last edited by
      #2

      If you are going to do *ANY* navigation in a dialog, you need to have the dialog embed an iframe... otherwise it will open a new browser window. below is an example of a dialog "host" than can be reused. When the inner frame document wants to close the dialog, simply set the parent.returnValue = "R", rather than window.close(). Hope this helps... Copy Alert Matrix <!-- var g_iInterval = 0; var g_iLoop = 0; function window_onload() { document.all["MatrixCopy"].style.display = ""; document.all["LoadingMsg"].style.display = "none"; window_onresize(); window.returnValue = ""; // default to empty string g_iInterval = window.setInterval("CheckForSave()",500); } function CheckForSave() { if (window.returnValue == "R") { g_iLoop++; if (g_iLoop > 2) { window.clearInterval(g_iInterval); window.close(); } } } function window_onresize() { var oLP = document.all["MatrixCopy"]; oLP.style.posHeight = document.body.offsetHeight; oLP.style.posWidth = document.body.offsetWidth; } //--> Loading...

      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