473,471 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help to pop up a window before using Location to redirect a page

All

I want to pop up a window before/during redirect to another page. Sort of a
confirmation page:

<?
....
/*
I need to pop up a window here
*/
header("Location:somecode here");
....
?>

Any comments are welcome. thx.

-Steven
Jul 16 '05 #1
3 6815
Steven wrote:
All

I want to pop up a window before/during redirect to another page. Sort of a
confirmation page:

<?
...
/*
I need to pop up a window here
*/
header("Location:somecode here");
...
?>

Any comments are welcome. thx.

-Steven


It's impossible to do it the way you're talking about. headers have to
be sent before any HTML, and what you're talking about would involve
HTML, if not javascript. Only way I can think of to do what you want to
do is javascript:

// ... js code ...
window.open('your_pr0n_popup',...); // ;-)
window.location...
//

Jul 16 '05 #2
"Steven" <xu*****@comcast.net> wrote in
news:L0DUa.153420$ye4.103857@sccrnsc01:

"Joshua Ghiloni" <jd***@SPAM.ME.AND.DIE.cwru.edu> wrote in message
news:bf**********@eeyore.INS.cwru.edu...
Steven wrote:
> "Joshua Ghiloni" <jd***@SPAM.ME.AND.DIE.cwru.edu> wrote in message
> news:bf*********@eeyore.INS.cwru.edu...
>
>>Steven wrote:
>>
>>>All
>>>
>>>I want to pop up a window before/during redirect to another page.
>>>Sort
>
> of a
>
>>>confirmation page:
>>>
>>><?
>>>...
>>>/*
>>> I need to pop up a window here
>>>*/
>>> header("Location:somecode here");
>>>...
>>>?>
>>>
>>>Any comments are welcome. thx.
>>>
>>>-Steven
>>>
>>>
>>
>>It's impossible to do it the way you're talking about. headers have
>>to be sent before any HTML, and what you're talking about would
>>involve HTML, if not javascript. Only way I can think of to do what
>>you want to do is javascript:
>>
>>// ... js code ...
>>window.open('your_pr0n_popup',...); // ;-)
>>window.location...
>>//
>>
>
>
> Thanks. Can I use js to popup new window and stll use header
> location for > theother?
>
> -Steven
>
>
>
>


No. Javascript is just (kind of) a part of HTML. You can not send ANY
output to the browser before sending headers, including the Location
header. You can't even send blank lines. Read up on Javascript's
window.location or window.href. Somethingl ike that.


Thanks a lot for the quick response. Let me read some javascript now
:) ...


What about popping up the window after the redirect? On the page that
loads after redirect add this to <body>:

<body onLoad="window.open('yourpopupurl.html');">

Or pass a querystring to test for popup:

<body <? if ($_REQUEST["qstring"]=="Y") { echo " window.open
('yourpopup.html'); "; } ?>>

HTH

DB @ MCT

Jul 16 '05 #3
On Sat, 26 Jul 2003 15:50:05 -0500, Steven wrote:
I want to pop up a window before/during redirect to another page. Sort
of a confirmation page:


It's not possible. I would create an intermediary
page that would display the confirmation message
and refresh to the next page after a few seconds
or a minute.

Jul 16 '05 #4

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

Similar topics

2
by: quitaxe | last post by:
hi i am facing this problem when i redirect to a asp page using - Response.redirect "mynext.asp" the problem is that the current page is using frames so this mynext.asp is also getting loaded...
5
by: PaulThomas | last post by:
Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" but the application always starts the "Login" page - - - How can I change the start page to the Home.aspx??? On the login...
10
by: Thad | last post by:
Any javascript I could try on this? I've got a popup window on my site with the browser chrome removed. Another site's gone ahead and done a popup to my same .html page. The visitor to that site...
5
by: GEL | last post by:
Hi, I want to open a new browser window, let the user use that window for several minutes, and when they close, I'd like to change the page displayed in the original window. According to...
2
by: kevinm3574 | last post by:
So, I'm doing the following in a php script so that I can fire a download dialogue AND redirect the page (after clicking submit in a form). I'm doing it this way because of the problem with...
3
by: alison | last post by:
I am trying to redirect the parent page when the user clicks an html button in an aspx page by using the javascript: window.opener.location.href="EditOrders.aspx"; This works fine on IE for...
2
by: Ricardo Videira | last post by:
Hi to all. I'm having trouble with the following situation: I have a page where the user inserts some stuff and when he clicks on the submit button a popup window showing that info is launched...
4
by: R Reyes | last post by:
Whenever I right-click on "Open in New Tab/Window" my website ALWAYS opens in the same window/tab. This is most likely a programming issue because when I visit other websites it works just fine. ...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.