Keeping popup Window on top when reloaded

R

Raffi

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="javascript" 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=\"#aaffff\">

<form method="LINK" onClick="window.open('http://www.google.com',
'popup1', 'width='+w+',height='+h+',toolbar=0,scrollbars=0,screenX='+winl+',screenY='+wint+',left='+winl+',top='+wint+'')"></A>
<input type="submit" value="Continue">
</form>

</body>
</html>
 
R

Raffi

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="javascript" 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=\"#aaffff\">

<form method="LINK" onClick="window.open('http://www.google.com',
'popup1', 'width='+w+',height='+h+',toolbar=0,scrollbars=0,screenX='+winl+',screenY='+wint+',left='+winl+',top='+wint+'')"></A>
<input type="submit" value="Continue">
</form>

</body>
</html>

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

Raffi
 
G

Grant Wagner

Raffi said:
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="javascript" 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=\"#aaffff\">

<form method="LINK" onClick="window.open('http://www.google.com',
'popup1', 'width='+w+',height='+h+',toolbar=0,scrollbars=0,screenX='+winl+',screenY='+wint+',left='+winl+',top='+wint+'')"></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(this.action, this.target, '...attributes...');
if (w) {
w.focus();
}
return true;
">
</form>

</body>
</html>

Or perhaps I'm misunderstanding 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).
 

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

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top