Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

Sponsored Links

Discuss "page processing" in the ASP Development forum.

ASP Development - Learn coding practices and tips to get the best out of your Active Server Pages (ASP). The Classic ASP forum is for ASP/VBScript and ASP/JScript applications.


Reply « Previous Thread | Next Thread »  
 
LinkBack Thread Tools Display Modes
  #1  
Old August 25th, 2008, 11:39 AM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 197
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
todd2006 is an unknown quantity at this point
Default page processing

Hi,

I have a problem and i need some help.

I have a page where user enters the personal information and credit card details.

when he hits submit it runs the credit card and dumps the information into the table.

What i want to do is when the user hits submit button i want to show a page where it says processing.

right now i have my form tag like this

<form method="POST" name="frm1" id="frm1" action="confirmadd.asp" onsubmit="return formCheck(this);">

can someone tell me how i can make it happen.

todd
Reply With Quote
Sponsored Links
  #2  
Old August 26th, 2008, 01:49 AM
Shadow Wizard's Avatar
Ask Me About Dragons :D

 
Join Date: Jul 2008
Posts: 23
Thanks: 0
Thanked 4 Times in 4 Posts
Blog Entries: 1
Rep Power: 1
Shadow Wizard is on a distinguished road

Awards Showcase
Microsoft .Net Classic ASP JavaScript 
Total Awards: 3

Default

in confirmadd.asp have this code on top of your code:
Code:
Response.Write("<div id=""pnlPleaseWait"">Processing request, please wait...</div>")
Response.Flush
then after the heavy code finished running, have this code:
Code:
Response.Write("<script type=""text/javascript""> document.getElementById(""pnlPleaseWait"").style.display = ""none""; </script>")
Response.Flush

Comments on this post
mehere agrees:
mehere agrees: Thanked Post
Reply With Quote
The Following User Says Thank You to Shadow Wizard For This Useful Post:
mehere (August 26th, 2008)
  #3  
Old August 26th, 2008, 11:56 AM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 197
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
todd2006 is an unknown quantity at this point
Default

shadow,

thanks for your help.

I tried ur code I tweaked it a little to add a image

Code:
Response.Write("<div id=""pnlPleaseWait""><img src=/images/Loading.gif>Your Request is Processing...<br/> do not press Back button.</div>")
and then after the credit card processing is finished

I have this code

Code:
Response.Write("<script type=""text/javascript""> document.getElementById(""pnlPleaseWait"").style.display = ""none""; </script>")
Response.Flush

what happens is it always shows me the earlier code which has the image in it.

any idea because once the credit card is processed i want to see the rest of the page.

todd
Reply With Quote
  #4  
Old August 26th, 2008, 12:38 PM
Barn Frequenter

 
Join Date: Mar 2008
Posts: 197
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1
todd2006 is an unknown quantity at this point
Default

Ok i found out what the problem is

I have the code like this

Code:
Response.Write("<div id=""pnlPleaseWait""><img src=/images/Loading.gif>Your Request is Processing...<br/> do not press Back button.</div>")
Response.Flush


---- do credit card processing  ---

Response.Write("<script type=""text/javascript""> document.getElementById(""pnlPleaseWait"").style.display = ""none""; </script>")
Response.Flush

Now i see if the credit card did go through or it was decline

If Result=0 then

"Credit card went through

Else
"credit card didnt go through"

Response.Redirect("decline.asp")
End if
if the credit card didnt go through it will redirect to decline.asp

but right now if the credit card is decline it doesnt redirect to the decline.asp page it just shows a blank page.

any idea

todd
Reply With Quote
  #5  
Old August 26th, 2008, 05:04 PM
Shadow Wizard's Avatar
Ask Me About Dragons :D

 
Join Date: Jul 2008
Posts: 23
Thanks: 0
Thanked 4 Times in 4 Posts
Blog Entries: 1
Rep Power: 1
Shadow Wizard is on a distinguished road

Awards Showcase
Microsoft .Net Classic ASP JavaScript 
Total Awards: 3

Default

after using Flush you can't Redirect.. doing so will result in error.
since Flush is essential for what you need here, you have two main options:
  1. use client side redirect instead of Response.Redirect
  2. use AJAX instead of two pages like now

Comments on this post
micky agrees:
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > ASP Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow Page Processing richyrich .Net Development 29 August 11th, 2008 04:13 AM
go page to page questionaire app peebman2000 .Net Development 3 April 26th, 2008 04:42 PM


All times are GMT -4. The time now is 02:32 PM.



Content Relevant URLs by vBSEO 3.2.0