473,396 Members | 1,886 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,396 software developers and data experts.

Pop-up window not getting focus?

Hi, I've used the following javascript structure in other places in my
asp.net app, but for this one the pop-up window still goes to the back
and doesn't get the focus.

button onclick event:
Response.Write("<script>var w=window.open('ECN.aspx', 'ECN',
'width=650,height=550,top=50,left=100,toolbar=no,m enubar=no,resizable=ye
s');w.focus();</script>")

Any ideas how to make this work or what could be causing the behavior?
I'm calling it from a form that is in a frameset.

Thanks,

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
5 5295
yyj
you'd better seperate the "<script>" tag just like this:
"<scr"+"ipt>",have a try!
"Kathy Burke" <ka**********@attbi.com>
??????:eX**************@TK2MSFTNGP10.phx.gbl...
Hi, I've used the following javascript structure in other places in my
asp.net app, but for this one the pop-up window still goes to the back
and doesn't get the focus.

button onclick event:
Response.Write("<script>var w=window.open('ECN.aspx', 'ECN',
'width=650,height=550,top=50,left=100,toolbar=no,m enubar=no,resizable=ye
s');w.focus();</script>")

Any ideas how to make this work or what could be causing the behavior?
I'm calling it from a form that is in a frameset.

Thanks,

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
yyj
Please take this:
Response.Write("<scr"+"ipt> alert('alert!the pwd had been changed!')
</scr"+"ipt>");

"Kathy Burke" <ka**********@attbi.com>
??????:eX**************@TK2MSFTNGP10.phx.gbl...
Hi, I've used the following javascript structure in other places in my
asp.net app, but for this one the pop-up window still goes to the back
and doesn't get the focus.

button onclick event:
Response.Write("<script>var w=window.open('ECN.aspx', 'ECN',
'width=650,height=550,top=50,left=100,toolbar=no,m enubar=no,resizable=ye
s');w.focus();</script>")

Any ideas how to make this work or what could be causing the behavior?
I'm calling it from a form that is in a frameset.

Thanks,

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3
Please tell me why? The script works in other places, why would this
cause it not to have focus?

Thanks,
Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4
Hi, I was given told to use this in answer to my question:

response.write("<scr"+"ipt> alert('alert!the pwd had been changed!')
</scr"+"ipt>");

I would like to understand what this does and why would it make the
pop-up get focus???

Thanks for enlightenment.

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5
This will create a pop up 'message box' on the client. This will not help
you pop up another browser window with a page in it, or give a different
window focus. I'm not sure why you need to concatenate the text in the
'script' tags. It will give focus to the 'message box' window, where you can
send text in the message.

You can use the RegisterClientScriptBlock() method to write the client
script to the page, instead of the Response.Write() method.
In the text parameter for the script block, you will need to send some
client script to open a new window, like window.open() in Javascript. When
that page loads, you can have a client script in the Load event that says
window.focus(), which will give itself focus when it loads.

I hope that helps some.

-Darrin

"Kathy Burke" <ka**********@attbi.com> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Hi, I was given told to use this in answer to my question:

response.write("<scr"+"ipt> alert('alert!the pwd had been changed!')
</scr"+"ipt>");

I would like to understand what this does and why would it make the
pop-up get focus???

Thanks for enlightenment.

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #6

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

Similar topics

4
by: Roy Smith | last post by:
In the recent "transforming a list into a string" thread, we've been discussing the fact that list.pop() is O(1), but list.pop(0) is O(n). I decided to do a little timing experiment. To be sure,...
4
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
1
by: spencer | last post by:
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor)...
6
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the...
2
by: John Hoge | last post by:
I would like to open an exit pop when a user leaves my site, but I don't want to the back button to trigger the pop if the user remains in my site. I'm using the onUnload attribute of the Body...
11
by: Vijay Kumar R Zanvar | last post by:
> In <pan.2004.04.22.04.06.05.969827@bar.net> "Mac" <foo@bar.net> writes: > > >Is it legal to declare errno after you've included errno.h? > > > >For example: > > > >#include<errno.h> > > >...
25
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a...
7
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element...
4
by: j_depp_99 | last post by:
The program below fails on execution and I think the error is in my pop function but it all looks correct.Also could someone check my code as to why my print function is not working? I havent...
20
by: merrittr | last post by:
I need some C advice I want to read in string commands from a user when the user enters a \n I want to push it on the stac. Then at some point , if the user enters the word print pop off and print...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.