473,465 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

back button problem

I added a 'Back' button to my page, and wrote 'OnClick'
code something like this:

Response.Write("<script>history.go(-" +
iDepthIndex.ToString() + ");</script>");

But, it dosnt work! Effect is that browser navigates to
desired page as expected and go back from where it
started! But, the 'Back' button on browser works normaly.
I dont get it!!??

Thanks in advance,
Vedran
Nov 17 '05 #1
4 7578
Here's some back button code that may work out better for you:
http://www.ftponline.com/vsm/2003_07...ne/columns/qa/

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Hypo" <ve*****************@hypo-alpe-adria.com> wrote in message
news:06****************************@phx.gbl...
I added a 'Back' button to my page, and wrote 'OnClick'
code something like this:

Response.Write("<script>history.go(-" +
iDepthIndex.ToString() + ");</script>");

But, it dosnt work! Effect is that browser navigates to
desired page as expected and go back from where it
started! But, the 'Back' button on browser works normaly.
I dont get it!!??

Thanks in advance,
Vedran

Nov 17 '05 #2
Thanks for the link but thats not what i wanted. That
custom 'back' button uses Page.Redirect() method to
navigate and that is not acceptible because original page
(the page i want to return to) can go to several round-
trips and transformations and my intention is to go back
to exact same state of page what was left behind. Exactly
same behavior like browser 'back' button. I still cant
figure it out why JScript 'history.back()' doesn work
properly, any ideas ... ? And, btw, I navigate to that
page (with 'back' button) using Server.Transfer() method.

Thanks

-----Original Message-----
Here's some back button code that may work out better for you:http://www.ftponline.com/vsm/2003_07...ne/columns/qa/

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Hypo" <ve*****************@hypo-alpe-adria.com> wrote in messagenews:06****************************@phx.gbl...
I added a 'Back' button to my page, and wrote 'OnClick'
code something like this:

Response.Write("<script>history.go(-" +
iDepthIndex.ToString() + ");</script>");

But, it dosnt work! Effect is that browser navigates to
desired page as expected and go back from where it
started! But, the 'Back' button on browser works normaly. I dont get it!!??

Thanks in advance,
Vedran

.

Nov 17 '05 #3
Thanks for the link but thats not what i wanted. That
custom 'back' button uses Page.Redirect() method to
navigate and that is not acceptible because original page
(the page i want to return to) can go to several round-
trips and transformations and my intention is to go back
to exact same state of page what was left behind. Exactly
same behavior like browser 'back' button. I still cant
figure it out why JScript 'history.back()' doesn work
properly, any ideas ... ? And, btw, I navigate to that
page (with 'back' button) using Server.Transfer() method.

Thanks

-----Original Message-----
Here's some back button code that may work out better for you:http://www.ftponline.com/vsm/2003_07...ne/columns/qa/

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Hypo" <ve*****************@hypo-alpe-adria.com> wrote in messagenews:06****************************@phx.gbl...
I added a 'Back' button to my page, and wrote 'OnClick'
code something like this:

Response.Write("<script>history.go(-" +
iDepthIndex.ToString() + ");</script>");

But, it dosnt work! Effect is that browser navigates to
desired page as expected and go back from where it
started! But, the 'Back' button on browser works normaly. I dont get it!!??

Thanks in advance,
Vedran

.

Nov 17 '05 #4
OIC, well Server.Transfer is likely the cause of some of your headaches.
You see this operation happens entirely on the server and the browser is
never even notified. When you say history.back, you're telling the browser
to go back a page. So it does - according to it's history, not knowing
about the server.transfer that took place on the server. You may have
better luck if you use Response.Redirect instead since this happens through
the browser.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Hypo" <ve*****************@hypo-alpe-adria.com> wrote in message
news:0c****************************@phx.gbl...
Thanks for the link but thats not what i wanted. That
custom 'back' button uses Page.Redirect() method to
navigate and that is not acceptible because original page
(the page i want to return to) can go to several round-
trips and transformations and my intention is to go back
to exact same state of page what was left behind. Exactly
same behavior like browser 'back' button. I still cant
figure it out why JScript 'history.back()' doesn work
properly, any ideas ... ? And, btw, I navigate to that
page (with 'back' button) using Server.Transfer() method.

Thanks

-----Original Message-----
Here's some back button code that may work out better

for you:
http://www.ftponline.com/vsm/2003_07...ne/columns/qa/

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Hypo" <ve*****************@hypo-alpe-adria.com> wrote

in message
news:06****************************@phx.gbl...
I added a 'Back' button to my page, and wrote 'OnClick'
code something like this:

Response.Write("<script>history.go(-" +
iDepthIndex.ToString() + ");</script>");

But, it dosnt work! Effect is that browser navigates to
desired page as expected and go back from where it
started! But, the 'Back' button on browser works normaly. I dont get it!!??

Thanks in advance,
Vedran

.

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter D. Dunlap | last post by:
Hello, I realize that this may not be the best place to ask this question, through the application is asp.net. I also realize that questions about disabling the back button are generally met...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
1
by: Johan Nedin | last post by:
Hello! I am having a problem with the @OutputCache page directive and Web browser Back Buttons. Problem: After setting <%@ OutputCache Location="None" %> on my pages I get the "Warning!...
8
by: Shimon Sim | last post by:
Hi, Every time I write ASP.NET application I have the same problem - Back button on the browser is my enemy. I have to tell client avoid using "Back" button and if you use it make sure to refresh...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
5
by: ns21 | last post by:
How can the browser back button be disabled If the form is submitting information to other pages or submitting to itself or using redirections. I tried the tweaks like history.forward(1) in each...
7
by: mohammed.naghman | last post by:
Hi, I have 2 submit buttons in a jsp page. One of them takes me to page2.jsp and also passes the values enetered to page2.I have a link in the page2 that does a history.back to come to the...
8
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I the page knows there was a cross post back. but i can not find the control. (asp.net 3.5) calling page has a master calling control: <asp:Button ID="btnSendAlert" runat="server" Text="Go"...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.