Skip to main content
Known Participant
April 9, 2010
Question

onclick open window

  • April 9, 2010
  • 2 replies
  • 881 views

<a href="##"   onClick="window.open(


    '\\server name\cr\google\info\sent\0\#filename#',


    'myWin', 


    'status, width=800, height=200, screenX=100,screenY=75,left=100,top=75');  return false">#

filename# </a>

I am using onclick to open a text file locate on different server but it did not work any suggestions?

    This topic has been closed for replies.

    2 replies

    Inspiring
    April 21, 2010

    bebright09,

    You might give this a try. I use it when I want a pop-up window. This will

    display the pop-up window centered on page, but you can resize it.

    <head>

    <script language="JavaScript">
    <!-- Begin
    function NewWindow(mypage, myname, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
    }
    //  End -->
    </script>

    </head>

    hyperlink attribute:

    onclick="NewWindow(this.href,'name','enter width','enter height','yes');return false;"

    Example:

    onclick="NewWindow(this.href,'name','600','600','yes');return false;"

    Leonard B

    Inspiring
    April 9, 2010

    <a href="the file you want" target="_blank">

    Known Participant
    April 9, 2010

    Thanks We did tried but we can't position or fix width and height of window with this method.