473,387 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Event on anchor change(click back button) in URL

Hi

We are developing an Ajax based application. In this application the
URL is fixed and as user navigates on the application we will change
Anchor on the URL so that user can bookmark the url and can load the
page on demand.

When user refreshes the page we have no issue in the populating the
page based on the anchor in URL as on load we can capture the
hash(#anchor) and act accordingly.

sample URL: http://www.google.com/somecontext#<anchor>

When the user clicks back button anchor is changing but not able to
know where to get callback.
Is there any event or way I can find when the user has clicked back
button.

Any help is appreciated. Thanks in advance.

Thanks
Venkat Gunnu

Jul 26 '07 #1
2 6083
On Jul 26, 1:41 pm, gvrajku...@gmail.com wrote:
Hi

We are developing an Ajax based application. In this application the
URL is fixed and as user navigates on the application we will change
Anchor on the URL so that user can bookmark the url and can load the
page on demand.

When user refreshes the page we have no issue in the populating the
page based on the anchor in URL as on load we can capture the
hash(#anchor) and act accordingly.

sample URL:http://www.google.com/somecontext#<anchor>

When the user clicks back button anchor is changing but not able to
know where to get callback.
Is there any event or way I can find when the user has clicked back
button.

Any help is appreciated. Thanks in advance.

Thanks
Venkat Gunnu
No, you can't do that. It's been talked about a lot on various
Internet sites lately, since Ajax became popular. What you CAN do, and
what people usually do, is set an interval do check the value of
location.href every 200 ms or similar, and when the user clicks back
the monitor (the object that checks the value of href) will notice
that soon and act accordingly. It works just fine.

Jul 26 '07 #2
On Jul 26, 10:47 am, Darko <darko.maksimo...@gmail.comwrote:
On Jul 26, 1:41 pm, gvrajku...@gmail.com wrote:


Hi
We are developing an Ajax based application. In this application the
URL is fixed and as user navigates on the application we will change
Anchor on the URL so that user can bookmark the url and can load the
page on demand.
When user refreshes the page we have no issue in the populating the
page based on the anchor in URL as on load we can capture the
hash(#anchor) and act accordingly.
sample URL:http://www.google.com/somecontext#<anchor>
When the user clicks back button anchor is changing but not able to
know where to get callback.
Is there any event or way I can find when the user has clicked back
button.
Any help is appreciated. Thanks in advance.
Thanks
Venkat Gunnu

No, you can't do that. It's been talked about a lot on various
Internet sites lately, since Ajax became popular. What you CAN do, and
what people usually do, is set an interval do check the value of
location.href every 200 ms or similar, and when the user clicks back
This sounds crazy to me. Why try to make the browser interface do
something it wasn't designed to do? If you are going to write a Web
application that runs on a single page, you need to provide a suitable
navigation interface. By the same token, you can provide a
bookmarking interface that tacks on a hash without polluting the
browser's navigation history.

Jul 26 '07 #3

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

Similar topics

0
by: alexB | last post by:
You can call the sub() just like any other sub() or function() like so... Call DataGrid1_SelectedIndexChanged(sender,e ) Depending on the circumstances "sender" and "e" may be irrelevent, in...
7
by: MLH | last post by:
Case in point... http://www.woodplanet.com/index.cfm?path=/main/form/comps/ValleyLumberSalesInc_2033511.htm After reaching this URL, IE's Back button would not take me back to Google, where I had...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
3
by: Ersin Gençtürk | last post by:
hi, I wrote a function like this : public static void Alert(string message){ message=message.Replace("'","\'"); message=message.Replace("\n","\\n"); ...
3
by: Paul | last post by:
Hi, just wondering if there is a way to disable the back button of the browser as I have a logoff page and would like to not allow the back operation? Guessing there may be a way to do it through...
1
by: joe | last post by:
Logout question I use a session to store the login information, say Session("Login") = success and use page_load to test the session("Login") success or not say If Session("Login") <success...
1
by: confusedofphp | last post by:
Hi all, Im very new to php. Currently im creating an online exam system which uses php and mysql as the database. I have registration and login page which works pretty fine. I had problem when it...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.