Run code like this in PageLoad.
'Open a centered child window if About button is clicked:
btnAbout.Attributes("OnClick") =
"javascript
:lnWidth=500;lnHeight=400;lnTop=(screen .Height-lnHeight)/2;lnLeft
=(screen.Width-lnWidth)/2;window.open('About.aspx','MyAboutBox','toolbar=0 ,m
enubar=0,status=0,scrollbars=1,resizable=1,width=' +lnWidth+',height='+lnHeig
ht+',top='+lnTop+',left='+lnLeft+'');return false;"
btnAbout.Attributes("OnMouseOver") = "javascript
:window.status='Open
the About window';"
btnAbout.Attributes("OnMouseOut") = "javascript
:window.status='';"
================================================== =====================
Bonus:
'open the print dialog box when the printer image is clicked:
imgPrinter.Attributes("OnClick") = "javascript
:window.print();"
imgPrinter.Attributes("OnMouseOver") = "javascript
:window.status='Open
the Print Dialog box';"
imgPrinter.Attributes("OnMouseOut") = "javascript
:window.status='';"
--
Joe Fallon
"REB" <ru**@bjorgaard.com> wrote in message
news:O%****************@TK2MSFTNGP12.phx.gbl...
I tried this:
btnChangeDriverLocation.Attributes.Add ("onClick", "var mywindow
=window.open('ChangeLocation.aspx','', 'width=400, height=300');
mywindow.focus();");
No Luck, the pop-up still disappears behind the calling page.
"REB" <ru**@bjorgaard.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... This works but the window after opening loses focus immediately and
disappears behind the calling page.
btnChangeDriverLocation.Attributes.Add ("onClick",
"window.open('ChangeLocation.aspx','', 'width=400, height=300');");
Anyone know how I can keep the window on top of the calling page?