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. pop up window issue [modified]

pop up window issue [modified]

Scheduled Pinned Locked Moved Web Development
helpjavascripttoolsannouncement
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
    chithra r
    wrote on last edited by
    #1

    hi all in my application iam opening a pop up window by clicking a button and passing the values from the pop up window to parent window.everything till here works fine.but the problem is when the pop up window is in use and if click outside(in the parent window)the pop up window is not blinking but it gets minimised.i want to make the pop up window active when it in use and it has to blink when clicked outside.i have tried using showmodaldialog function also,but when using that another pop up window opens and values are not passed to parent window.iam providing the code herewith through which i opened the pop up window.can anyone help me in fixing this problem.... code string scr = @"<script> function update(elemValue) { document.getElementById('ctl00_ContentPlaceHolder3_txtName').innerText=elemValue[0]; } </script>"; // register the javascript into the Page Page.RegisterClientScriptBlock("update", scr); //add our popup onclick attribute to the desired element on the page (Here, Hyperlink1) lnkSearch.Attributes.Add("onclick", "window.open('lrs_SearchDesc.aspx',null,'left=190, top=225, height=350, width= 465, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');");

    pintoo

    modified on Friday, February 22, 2008 3:38 AM

    S 1 Reply Last reply
    0
    • C chithra r

      hi all in my application iam opening a pop up window by clicking a button and passing the values from the pop up window to parent window.everything till here works fine.but the problem is when the pop up window is in use and if click outside(in the parent window)the pop up window is not blinking but it gets minimised.i want to make the pop up window active when it in use and it has to blink when clicked outside.i have tried using showmodaldialog function also,but when using that another pop up window opens and values are not passed to parent window.iam providing the code herewith through which i opened the pop up window.can anyone help me in fixing this problem.... code string scr = @"<script> function update(elemValue) { document.getElementById('ctl00_ContentPlaceHolder3_txtName').innerText=elemValue[0]; } </script>"; // register the javascript into the Page Page.RegisterClientScriptBlock("update", scr); //add our popup onclick attribute to the desired element on the page (Here, Hyperlink1) lnkSearch.Attributes.Add("onclick", "window.open('lrs_SearchDesc.aspx',null,'left=190, top=225, height=350, width= 465, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');");

      pintoo

      modified on Friday, February 22, 2008 3:38 AM

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Don't use pop-ups. Seriously. They're broken. Intentionally broken. Too many people misused them, and so we had to break them. They're not gonna get less broken either, 'cause folks would just misuse them again. But, ignoring that, assuming they did work reliably, you still wouldn't want to do that. Because now, you've locked the user's browser window, with all the nice friendly browser-window controls they've become so accustom to, and forced them to deal with your little dialog. Here's a better idea: if you don't need or want them to see or interact with the page contents, then redirect them to another page and put your dialog stuff on it. If you do want or need them to see (but not interact) with the page contents, then use one of the many "lightbox"-style dialog techniques available to overlay the page with a semi-transparent layer on top of which you can place your dialog stuff (but still all contained within the page itself). And whatever you do, don't forget to make the Escape and Enter keys work sensibly. If it looks like a dialog, then make it act like one.

      But who is the king of all of these folks?

      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