ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 3rd, 2009, 05:24 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
VBScript - Discussion - Response.redirect

Hi,

I am implementing the following condition

<% If cnt>100 then
Response.write "too many records!!. Go back & try again."
Response.redirect "back.asp"
else
.....some coding...... %>
<form action="next.asp" method=post>
<input type=submit value=submit>
<% End if %>

However the browser is redirecting itself to the previous page,without showing the message.

Alternatively,I have also tried to put a form statement & submit button in IF for going back,but it is submitting next.asp in both conditions.

Pls help.

How can I do this
Thanks

Reply With Quote
  #2  
Old July 3rd, 2009, 05:39 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Hi,

You have a couple of options, you could either offer the user a link that they can click instead of just redirecting them to back.asp:
Code:
<% If cnt>100 then
	Response.write("Too many records&nbsp;<a href=""back.asp"">Click Here to Try Again</a>")
else
.....some coding...... %>
<form action="next.asp" method=post>
<input type=submit value=submit>
<% End if %>

Or you could use javascript to display the message as an alert:
Code:
<% If cnt>100 then
	Response.write("<script>alert('too many records!!. Go back & try again.');</script>")
	Response.redirect "back.asp"
else
.....some coding...... %>
<form action="next.asp" method=post>
<input type=submit value=submit>
<% End if %>

Reply With Quote
  #3  
Old July 3rd, 2009, 06:17 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by sync_or_swim
Hi,

You have a couple of options, you could either offer the user a link that they can click instead of just redirecting them to back.asp:
Code:
<% If cnt>100 then
	Response.write("Too many records&nbsp;<a href=""back.asp"">Click Here to Try Again</a>")
else
.....some coding...... %>
<form action="next.asp" method=post>
<input type=submit value=submit>
<% End if %>

Or you could use javascript to display the message as an alert:
Code:
<% If cnt>100 then
	Response.write("<script>alert('too many records!!. Go back & try again.');</script>")
	Response.redirect "back.asp"
else
.....some coding...... %>
<form action="next.asp" method=post>
<input type=submit value=submit>
<% End if %>


Thanks.
I want to display a button for back & when the user click that he should be directed to the previous page. Cannot figure out the coding for that

Reply With Quote
  #4  
Old July 3rd, 2009, 06:22 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Quote:
Originally Posted by newtoasp_pk
Thanks.
I want to display a button for back & when the user click that he should be directed to the previous page. Cannot figure out the coding for that

You just need to adapt my first example to use a button instead of a link:
Code:
	Response.Write("<form name=""dummyForm"" action=""back.asp"" method=""post"">")
	Response.write("Too many records&nbsp;<input type=""submit"" name=""btnSubmit"" value=""Try Again""")
	Response.Write("</form>")

Reply With Quote
  #5  
Old July 3rd, 2009, 06:39 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Thumbs up

Quote:
Originally Posted by sync_or_swim
You just need to adapt my first example to use a button instead of a link:
Code:
	Response.Write("<form name=""dummyForm"" action=""back.asp"" method=""post"">")
	Response.write("Too many records&nbsp;<input type=""submit"" name=""btnSubmit"" value=""Try Again""")
	Response.Write("</form>")


Many Thanks. Easy solution.

Reply With Quote
  #6  
Old July 3rd, 2009, 06:41 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Quote:
Originally Posted by newtoasp_pk
Many Thanks. Easy solution.

You're welcome, glad it helped!!

Without meaning to sound rude, the more information you provide in your original question, the more chance we have of providing a solution.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > VBScript - Discussion - Response.redirect


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
Stay green...Green IT