473,699 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP re-direct question...

Hi,

I have an asp page which basically takes some data from a previous
page form and inserts the data to my database and then does a
re-direct to:

Response.Redire ct "JS_Create. asp"

On this page is just an animated logo saying something like 'Loading
Data ....'

On this asp page JS_Create.asp I have another re-direct handled by a
timer to go to JobSheet.asp.

The idea is that the user enters data into the form, if the form is
validated correctly, they are transferred to the next page which tells
them the data is loading. They are held there for say 3 to 5 seconds
and then transferred to the final page JobSheet.asp.

The code I have on JS_Create.asp for the timed re-direct is:

_______________ ____________

<%
Sub Delay(DelaySeco nds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
%>

later in the page I have:

<%
Delay(5)
Response.Redire ct "JobSheet.a sp"
%>

_______________ _____

The problem is that once the form is submitted, the page does not
change to JS_Create.asp, it just sits there on the form for the 3 to 5
seconds and then jumps immediately to JobSheet.asp. I want
JS_Create.asp to be displayed first.

Where should I place the asp or change it for this to occur ?

Appreciate your help.
David
Jul 21 '05 #1
2 1601
Here's a way:

A couple of points... The writing of the spaces is a "fix" for IE. You
can't use the redirect because you have already sent headers back to the
browser via the "flush", which you need to get the "Waiting... " displayed.
The introduction of the javascript into the output stream takes care of
redirecting to the final page.

CODE:

<html><head/>

<%
' Sub Delay is NOT changed in any way from your original code.
Sub Delay(DelaySeco nds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
%>

<body>
Waiting...
</body>
<%
' spaces for IE
response.write space(256)
' makes sure that previous text is displayed
response.flush( )
Delay(5)
' adds javascript to stream
response.write "<script
language=javasc ript>location.h ref='JobSheet.a sp';</script>"
' following line of code can't be used...
'Response.Redir ect "JobSheet.a sp"
%>
</html>
"David" <da***@scene-double.co.uk> wrote in message
news:c1******** *************** **@posting.goog le.com...
Hi,

I have an asp page which basically takes some data from a previous
page form and inserts the data to my database and then does a
re-direct to:

Response.Redire ct "JS_Create. asp"

On this page is just an animated logo saying something like 'Loading
Data ....'

On this asp page JS_Create.asp I have another re-direct handled by a
timer to go to JobSheet.asp.

The idea is that the user enters data into the form, if the form is
validated correctly, they are transferred to the next page which tells
them the data is loading. They are held there for say 3 to 5 seconds
and then transferred to the final page JobSheet.asp.

The code I have on JS_Create.asp for the timed re-direct is:

_______________ ____________

<%
Sub Delay(DelaySeco nds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
%>

later in the page I have:

<%
Delay(5)
Response.Redire ct "JobSheet.a sp"
%>

_______________ _____

The problem is that once the form is submitted, the page does not
change to JS_Create.asp, it just sits there on the form for the 3 to 5
seconds and then jumps immediately to JobSheet.asp. I want
JS_Create.asp to be displayed first.

Where should I place the asp or change it for this to occur ?

Appreciate your help.
David

Jul 21 '05 #2
da***@scene-double.co.uk (David) wrote in message news:<c1******* *************** ***@posting.goo gle.com>...
Hi,

I have an asp page which basically takes some data from a previous
page form and inserts the data to my database and then does a
re-direct to:

Response.Redire ct "JS_Create. asp"

On this page is just an animated logo saying something like 'Loading
Data ....'


Why in the world would you want to slow the user down by 5 seconds for
every data entry form?
Jul 21 '05 #3

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

Similar topics

4
6425
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as well as some color coding, etc. Having trouble finding the same in an editor that'll run on OS X. -- Floydian Slip(tm) - "Broadcasting from the dark side of the moon"
11
4004
by: James | last post by:
My form and results are on one page. If I use : if ($Company) { $query = "Select Company, Contact From tblworking Where ID = $Company Order By Company ASC"; }
4
18527
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function blocks until something.exe terminates. Just what I /don't/ want. (Wouldn't an & be nice here! Sigh) I need something.exe to disconnect and run in the background while I
1
3699
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with sockets??
10
4216
by: James | last post by:
What is the best method for creating a Web Page that uses both PHP and HTML ? <HTML> BLA BLA BLA BLA BLA
8
4415
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an image, which will upload the record to a mySql db so users can then either view all profiles or query.. I.e. show all males in UK, all femails over 35 etc. Now, I'm not asking for How to do this but more what would be the best way? I've looked at...
8
3655
by: Lothar Scholz | last post by:
Because PHP5 does not include the mysql extension any more is there a chance that we will see more Providers offering webspace with Firebird or Postgres Databases ? What is your opinion ? I must say that i like it to see mysql replaced by a real database (stored procedures etc.)
1
3633
by: joost | last post by:
Hello, I'm kind of new to mySQL but more used to Sybase/PHP What is illegal about this query or can i not use combined query's in mySQL? DELETE FROM manufacturers WHERE manufacturers_id NOT IN ( SELECT manufacturers_id FROM products )
3
3481
by: presspley | last post by:
I have bought the book on advanced dreamweaver and PHP recently. I have installed MySQL and PHP server but am getting an error on the $GET statement show below. It says there is a problem with the variable $GET but $GET is not a variable, I thought it came from the page that calls the PHP file? if(($_GET)==""){ this gets an error
2
106607
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of cyclery? Look no further! </P> <FORM NAME='frmJobApp' METHOD=post ACTION="jobapp_action.php"> Please enter your name:
0
8613
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
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...
1
8908
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
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...
0
4374
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...
1
3054
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
2344
muto222
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.