1

I have this table down the side of this form I'm working on that has hyperlink buttons. The button are for FAQ. What I'm trying to do is when the hyperlink button is clicked I want a small text box, empty browser, whatever may be the simplest approach. I have the page launching with my text in it but it opens up on the left hand corner of my screen.

Here's what I have for code:

<asp:LinkButton ID="lnkBttnPsswrdReset" runat="server" OnClientClick="openPopUp()">Password Reset Info</asp:LinkButton><br />

<%--function to open pop up window for password reset hyperlink button --%>
<script type="text/javascript">
    function openPopUp() {
        myWindow = window.open('', '', 'width=250,height=250')
        myWindow.document.write("<p>Please contact the operator to reset yopur password after IT department business hours</p>")
        myWindow
        myWindow.focus()
    }
</script>
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
KBriz
  • 333
  • 2
  • 7
  • 21

3 Answers3

1

your question look similar to previous question such as the following link.

Center a popup window on screen?

accepted answer copied and pasted below

try this:

function popupwindow(url, title, w, h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no,      menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
} 
Community
  • 1
  • 1
1

Used Ajax comboBox.....worked nicely

KBriz
  • 333
  • 2
  • 7
  • 21
0

I would recommend you something like AlertifyJs, which is much nicer in every aspect, than a nasty Popup.

Thomas Junk
  • 5,588
  • 2
  • 30
  • 43