473,804 Members | 3,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keeping popup Window on top when reloaded

Here's my HTML code. What I'm trying to do is when the button is
pushed to refresh the popup window information, I want the popup to
return to the front. The way my code is now, when refreshed the popup
stays in the background confusing the users. Thanks for your help.

--------HTML Code------
<html>
<head>

<script language="javas cript" type="text/javascript">
var w = 380;
var h = 230;
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
</script>

</head>

<body bgcolor=\"#aaff ff\">

<form method="LINK" onClick="window .open('http://www.google.com' ,
'popup1', 'width='+w+',he ight='+h+',tool bar=0,scrollbar s=0,screenX='+w inl+',screenY=' +wint+',left='+ winl+',top='+wi nt+'')"></A>
<input type="submit" value="Continue ">
</form>

</body>
</html>
Jul 23 '05 #1
2 1777
th*********@yah oo.com (Raffi) wrote in message news:<fe******* *************** ****@posting.go ogle.com>...
Here's my HTML code. What I'm trying to do is when the button is
pushed to refresh the popup window information, I want the popup to
return to the front. The way my code is now, when refreshed the popup
stays in the background confusing the users. Thanks for your help.

--------HTML Code------
<html>
<head>

<script language="javas cript" type="text/javascript">
var w = 380;
var h = 230;
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
</script>

</head>

<body bgcolor=\"#aaff ff\">

<form method="LINK" onClick="window .open('http://www.google.com' ,
'popup1', 'width='+w+',he ight='+h+',tool bar=0,scrollbar s=0,screenX='+w inl+',screenY=' +wint+',left='+ winl+',top='+wi nt+'')"></A>
<input type="submit" value="Continue ">
</form>

</body>
</html>


I still can't get this to work. Any ideas? Thanks,

Raffi
Jul 23 '05 #2
Raffi wrote:
Here's my HTML code. What I'm trying to do is when the button is
pushed to refresh the popup window information, I want the popup to
return to the front. The way my code is now, when refreshed the popup
stays in the background confusing the users. Thanks for your help.

--------HTML Code------
<html>
<head>

<script language="javas cript" type="text/javascript">
var w = 380;
var h = 230;
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
</script>

</head>

<body bgcolor=\"#aaff ff\">

<form method="LINK" onClick="window .open('http://www.google.com' ,
'popup1', 'width='+w+',he ight='+h+',tool bar=0,scrollbar s=0,screenX='+w inl+',screenY=' +wint+',left='+ winl+',top='+wi nt+'')"></A>
A form does not have an onclick event, and I'd guess the closing link tag is an artifact of your usenet client, or possibly code
left over from previous attempts to make this work. Either way, it's unnecessary. And I don't believe LINK is valid form method, it
has to be one of GET or POST.

Given that you seem to want this to occur when the form is submitted, try:

<form method="GET"
action="http://www.google.com"
target="popup1"
onsubmit="
var w = window.open(thi s.action, this.target, '...attributes. ..');
if (w) {
w.focus();
}
return true;
">
<input type="submit" value="Continue ">
</form>

</body>
</html>


Or perhaps I'm misunderstandin g what you want to happen.

Be aware that with modern Web browsers and popup blockers, you can't be assured a new window has actually opened if you're dealing
with a general Internet audience. If your audience is a controlled Intranet one, popup blockers hopefully won't be a problem (since
you should be able to control the user agent enough to disable any feature which presents problems for your application).

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #3

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

Similar topics

2
1542
by: Thien-Anh | last post by:
Hi there, I have this code for a popup window. Everytime i go back to the front page, the popup will come up. I want it to pop up only the first time I come to the site. Would some one advice please. Thank you /* Function popup */ function popupPage() { var page = "advertisement_popup.htm"; windowprops = "height=453,width=650,location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=no"; window.open(page, "Popup",...
15
10100
by: H00ner | last post by:
Hello All Hope you can help Been pulling my hair out about a popup problem in ASP.NET. One of the forms i wrote requires the user to select a product from a list in a popup web form. the popup has a DataGrid on it and the page.load function DataBinds as you'd expect. I have Code-Behind in C# to emit a call to a JavaScript function which
1
2586
by: jeffrobbins | last post by:
Hello, I am having an issue that I haven't been able to find an answer for. Any help or pointers to information would be appreciated. I have a form, lets call it mainForm, that contains a dropdownlist of offices that is populated from a database query, and other form elements. A second form, lets call it childForm, can be opened (window.open()) via a link off of mainForm to add another office to the database. What I would like is to be...
1
1741
by: Rob Meade | last post by:
Lo all, Just after some suggestions here really... I have a page which lists a members of staff who have left our organisation, this list is then used by various departments in our organisation to carry out their own processes based on the fact that this member of staff has left, for example, clearing down security accounts, cancelling car parking swip cards, that kinda thing.
11
7351
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz 1.7.12 (linux kubuntu). It does work with konqueror. It seems to work with firefox on windows but not with IE (not completly sure though).
1
5286
by: XP | last post by:
Hello Everyone, I was stuck with this really frustrating problem for sometime. Let me explain what I am trying to achieve: There is a form and an inner iframe. The form's target is set to the iframe so that when the form is submitted, the page does not get reloaded/changed ( as the iframe would be the one getting refreshed. The Iframe is set to have 0 width and height to make it look invisible ). I have a copied the html source ( at...
18
3923
by: vjayis | last post by:
hi i am having a form which contains an text field., when the submit button is clicked the value of the textfield should be taken into the new popup window to display the results. i had tried but didnt get the solution., could anyone help me
3
4297
by: Bruce | last post by:
I have an application where a main window opens a popup window. Within the popup, I want to be able to post a form back to the popup all the while maintaining the opener property. Of course, once the popup window re-loads itself by posting a form to itself, all Javascript state information is lost and so opener is undefined. Is there any way I can communicate with the original opener of a popup window once the popup window has been...
7
2940
by: Kaster | last post by:
I am using the script below on several webpages, to pop up a window where people can order some things. It works well when shifting forth and back between the same page from where it is activated. But when it is reactivated from another page on the website the popup is reloaded and things written here dissapear. Is there a way to avoid the popup to reload and only come into focus when clicked from another page? ]> </script> <a...
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10319
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9132
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.