?
Solved

How can I emulate Javascripts History.back() in VBscript

Posted on 2003-03-24
3
Medium Priority
?
1,669 Views
Last Modified: 2012-05-04
I have an ASP page that is written in vbscript and a bit of Javascript.

I have a section that requires at the end of it to do a history.back()
if I use ASP's response.redirect it causes the page to reload, and I dont want that.

How can I go backwards in vbscript without reloading the page ?
0
Comment
Question by:DCPAus
3 Comments
 
LVL 1

Expert Comment

by:umangjoshi
ID: 8194529
consider i have a.asp and b.asp
i call b.asp from b.asp, and i don't want to go back using history.back();

so in a.asp please do the following

<body onLoad="history.forward(1)">
0
 
LVL 5

Accepted Solution

by:
prohacx earned 200 total points
ID: 8194652
Hi there DCPAus!

Of course you can always use some inline Javascript, so instead of using respone.redirect, do something like:

response.write "<html><head></head><body onLoad=""javascript: history.go(-1);"">"
response.write "</body></html>"

That will take you back and if the client doesn't force a reload (which you can set in some browsers), the page will not be reloaded. Also, if you enable caching in ASP, you have less chance of reloading a page.

Happy programming!

0
 
LVL 58

Expert Comment

by:Gary
ID: 9313102
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by prohacx

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question