Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Redirect After Page Processing 1

Status
Not open for further replies.

qberta01

Programmer
Nov 14, 2005
113
0
0
This is a simple question, I think.

I want to build an ASP page that collects data on submit and goes to another page for processing.The processing page will execute a proc on the SQL server and then redirect back to the original page giving a message to the
user that the step has been completed.

It can take several minutes for the proc to complete. Is it possible for the redirect to occur, giving my users the "this step is complete" message before the proc has finished executing? In other words, I don't want them to get all excited and go to step 2 before step 1 is done.

Thx!

Q
 
I think the safest way to do that is with an Iframe, that processes the page, and says "processing" before starting, and "complete" when done.

 
CreswellNet is right. Ive used Iframes in the past for similar situations

"Bugs are good for building character in the user
 
Another option would be to use XMLHTTP or XmlHttpRequest to make the request. The advantage here is that even if you hide an iframe it makes clicking noises just like a real browser. If you use an XMLHTTP object you can make the query from a javascript function and then send back some output which can be parsed and displayed in the original page without trying to manage window handles.
Basically this method would be AJAX-like but you could execute it from your second page (rather than trying to go full-blown single page application).

 
Hey Tarwn, do you have a recommended resource for more info on XMLHTTP? Of course I'll be web searching, shortly.
 
Unfortunately no. I basically cobble things together off google searches where that is concerned. I think 4GuysFromRolla had examples of using it server-side, but no client-side. Tek-Tips does have an AJAX forum that might have more information. Plus a search on XmlHttpRequest in either this forum or the Javascript forum might turn you up some good examples of cross-browser, client-side requests.
I've been meaning to write a tutorial on some of that, since I never managed to move all of my old content over to my new site, but it's one of those things I never manage to get around to.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top