opening a window and retaining focus

U

ujjc001

I have a page that has an asp button and smart nav is on. I add
"btnPrintServicePlan.Attributes.Add("onclick",
"javascript:printSP_window=window.open('cts_serviceplan.aspx','PrintSP');PrintSP_window.focus();")"
to open the new window but the problem is that the calling window posts
back and gets the focus again.
In the past I've used an html image rather than an asp button but that
leaves a lot to be desired also.
How can I open a new window and have it take the focus?
 
B

Bruce Barker

you need to cancel the postback;

"btnPrintServicePlan.Attributes.Add("onclick",
"javascript:printSP_window=window.open('cts_serviceplan.aspx','PrintSP');PrintSP_window.focus();returnfalse;")"-- bruce (sqlwork.com);"ujjc001" <[email protected]> wrote in messagehave a page that has an asp button and smart nav is on. I add> o open the new window but the problem is that the calling window posts> back and gets the focus again.> In the past I've used an html image rather than an asp button but that> leaves a lot to be desired also.> How can I open a new window and have it take the focus?>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top