J
Jim
I have a page that will have seveal links on it to pop up one of a
number of different financial tools. I'd like for the financial tools
to come up in their own window. Preferably, I'd even like to keep
them in the foreground until the user hit's the popups "Close" button
(my 401(K) site at Vanguard does this, and I think it's pretty neat).
I guess this request entails a couple of questions:
1. Currently, I have some JavaScript on the page that does something
like this:
function DoPopup()
{
window.open("www.mysite.com/popupthing.aspx", "_blank", null, false);
}
This works fine if I call it from a normal HTML tab like <a
href="javascriptoPopup();">Click this</a>, but what if I wanted this
to happen in resposne to an ASP button or ASP LinkButton? I tried
this in my code:
<asp:LinkButton id="PopupButton" OnClick="OnClickPopup"
runat="Server">Click this</asp:LinkButton>
and then in my codebehind:
public void OnClickPopup( object sender, System.EventArgs e)
{
string html = "<script language=JavaScript........"; // blah blah
blah javascript to do the popup...
Response.Write( html);
Response.End();
}
However, when I do this and click the link on my page, I get a whole
new (blank) page... How do I incorporate the current ASP page in the
response and then add this on to it, or should I be going about this
differently? Thanks!
Jim
number of different financial tools. I'd like for the financial tools
to come up in their own window. Preferably, I'd even like to keep
them in the foreground until the user hit's the popups "Close" button
(my 401(K) site at Vanguard does this, and I think it's pretty neat).
I guess this request entails a couple of questions:
1. Currently, I have some JavaScript on the page that does something
like this:
function DoPopup()
{
window.open("www.mysite.com/popupthing.aspx", "_blank", null, false);
}
This works fine if I call it from a normal HTML tab like <a
href="javascriptoPopup();">Click this</a>, but what if I wanted this
to happen in resposne to an ASP button or ASP LinkButton? I tried
this in my code:
<asp:LinkButton id="PopupButton" OnClick="OnClickPopup"
runat="Server">Click this</asp:LinkButton>
and then in my codebehind:
public void OnClickPopup( object sender, System.EventArgs e)
{
string html = "<script language=JavaScript........"; // blah blah
blah javascript to do the popup...
Response.Write( html);
Response.End();
}
However, when I do this and click the link on my page, I get a whole
new (blank) page... How do I incorporate the current ASP page in the
response and then add this on to it, or should I be going about this
differently? Thanks!
Jim