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

Pop-Up Window in need of delay?

I am trying to create a pop-up window that will remain in front of the
orignal webpage. The pop-up is called as follows:

<script type="text/javascript">
var newWin=null

var winl = (screen.width-208)/2;
var wint = (screen.height-228)/2;

newWin=window.open("URL",'mywindow','left=' + winl + ',top=' +
wint+
',width=208,height=228,toolbar=,menubar=,location= ,scroll=,resizable=,status=');

newWin=window.focus(mywindow);
</script>
The webpage that this pop-up is called from is a completely blank page
that calls another website via a frame:

<frameset rows="100%,*">
<frame src="URL" >
<frame src="Untitled">
</frameset>
<noframes>
</noframes>

The reasoning behind this is because I am unable to modify the page
that the frame is calling and a pop-up needed to be loaded in front of
it. The problem is, when this page is run the pop-up comes into focus,
but when the frame called URL is finished loading, the pop-up is pushed
to the back. I cannot seem to find a way to make it focus and I think
that delaying the pop-up from lauching would solve this problem but I
have been unable to properly implement it.

If anyone can help me I would appreciate it.

-Thanks

Jul 29 '05 #1
3 1555
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Asterix2XXX wrote:
[...]
The problem is, when this page is run the pop-up comes into focus,
but when the frame called URL is finished loading, the pop-up is pushed
to the back. I cannot seem to find a way to make it focus and I think
that delaying the pop-up from lauching would solve this problem but I
have been unable to properly implement it.


Please don't try. Popups are incredibly antisocial, most people won't see
them, and reputable browsers won't *let* you do this kind of thing anyway.
You'd be much better off redesigning your web site not to need a popup.

What do you need it for, anyway? The only application I can think of for
what you want is advertising...

- --
+- David Given --McQ-+ "Information wants to be free, but my mail client
| dg@cowlark.com | does not want to be chock-full of herbal pot
| (dg@tao-group.com) | alternative spam." --- Sant Lupus on Slashdot
+- www.cowlark.com --+

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFC6lxKf9E0noFvlzgRAl+JAJ9T3sM47GS2joUCAsTDBX YkLyLu2QCeN6tf
NH15RY6D0Zmj/+46jp7ACJQ=
=7mV6
-----END PGP SIGNATURE-----
Jul 29 '05 #2
Actually, this code works in Firefox. Just not in IE. I'm pretty sure
those are reputable browsers.

I am aware of the antisocialness of pop-ups, but I have no way of
editing the page that is appearing in the frame being called, the page
is hosted by someone else, somewhere else.

But, i do need the pop-up to control this page. I just don't know how
to insert the timing control for the pop-up. And I promise that it is
not for an advertisment.

Jul 29 '05 #3
Asterix2XXX wrote:
var winl = (screen.width-208)/2;
var wint = (screen.height-228)/2;
newWin=window.open("URL",'mywindow','left=' + winl + ',top=' +


Popups sized or positioned based on the size of the "screen" are a bad idea.
That one, for example, will appear partially on one of my physical screens
and partially on another... with a three inch gap between the halves.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 30 '05 #4

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)...
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...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
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...
1
by: pbd22 | last post by:
Hi all. I am using styles to lock down the GUI until the user enters some info in a CSS/DIV pop box. If the user does now scroll before he clicks, the pop box is centered and the background...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.