473,411 Members | 2,068 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,411 software developers and data experts.

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.Redirect "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(DelaySeconds)
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.Redirect "JobSheet.asp"
%>

____________________

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 1584
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(DelaySeconds)
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=javascript>location.href='JobSheet.asp';</script>"
' following line of code can't be used...
'Response.Redirect "JobSheet.asp"
%>
</html>
"David" <da***@scene-double.co.uk> wrote in message
news:c1*************************@posting.google.co m...
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.Redirect "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(DelaySeconds)
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.Redirect "JobSheet.asp"
%>

____________________

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.google.c om>...
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.Redirect "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
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...
11
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
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...
1
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...
10
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
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...
8
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...
1
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 ...
3
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...
2
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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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...
0
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...
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,...

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.