473,569 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ 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>histor y.go(-" +
iDepthIndex.ToS tring() + ");</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 7591
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>histor y.go(-" +
iDepthIndex.ToS tring() + ");</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>histor y.go(-" +
iDepthIndex.ToS tring() + ");</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>histor y.go(-" +
iDepthIndex.ToS tring() + ");</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.Redire ct 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>histor y.go(-" +
iDepthIndex.ToS tring() + ");</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
4274
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 with derision, so let me explain: (1) The site is actually a web-based application, not a "web site" per say, and is not accessable by the public. ...
8
2551
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 courses are populated. When course is selected, lists of occurrences, groups and
1
6414
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! Page has expired" error message, when pushing the Back Button in my Web browser.
8
6127
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 the page to latest information. I decided to pay information to application on the web and I see that some sites don't have those issues. Like I...
29
3965
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. The submit button posts the page back to the server. The button code detects an entry error and sends the page back to the user. This all works. ...
6
1933
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: myNextButton.Attributes.Add("onclick", "return confirm('Are you sure you want finish this test?');") to attach a popup box to a button. The problem is that the buttons only say OK...
5
2991
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 page to prevent user to navigate back but its not very effective. The server side scripting is done using ASP. you may ask that why at first...
7
8341
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 previous page to make any chnages necessary. Now after making my changes, instead of going to page2.jsp if I want to submit the page, Instead of...
8
2023
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" onclick="btnSendAlert_Click" PostBackUrl="ItemUpLoadAdmin.aspx" CommandArgument="5" />
8
4736
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 back to the form, where their selections show up. They can change whatever they want to change and resubmit the new query. Mostly, everything works...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7917
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
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 we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.