473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

opening a window and retaining focus

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_servic eplan.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?

Nov 19 '05 #1
1 896
you need to cancel the postback;

"btnPrintServicePlan.Attributes.Add("onclick",
"javascript:PrintSP_window=window.open('cts_servic eplan.aspx','PrintSP');PrintSP_window.focus();retu rnfalse;")"-- bruce (sqlwork.com);"ujjc001" <uj*****@gmail.com> wrote in messagenews:11**********************@g44g2000cwa.g ooglegroups.com...>I have 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?>

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
4
by: Amir | last post by:
What's the difference between the two ways of opening a new window and writing to it? Let's say I prepare a code that goes into a new window and save it in a variable winHTML: var winHTML =...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
5
by: REB | last post by:
Can someone help me with adding some javascript functionality to a button? What would the proper syntax for for (please help with the javascript I am rusty) for doing this: ...
2
by: Keshav Gadia | last post by:
Hi, I am an ASP.net newbie. I am writing a user control that is made up of datagrid with one of the columns opening a new window to display some details on click of the set image. I have...
5
by: Roger Withnell | last post by:
This is a framed webpage with the navigation bar in "NavBar" and the main window in "Main". When opening a new page in "Main" from "NavBar" with: function OpenFrameWindow(src) { var...
5
by: k.vanderstarren | last post by:
Hi All, I'm having a problem that is driving me absolutely batty and I'm hoping that one of you JavaScript gurus can help me out before I go stark raving mad. I am using the function shown...
0
by: IndyChris | last post by:
I've got a button my webpage that when clicked will open another window. Different criteria on the page will deteremine which window gets opened when the button is clicked. I have a switch...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.