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