473,769 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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#<an chor>

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 6103
On Jul 26, 1:41 pm, gvrajku...@gmai l.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#<an chor>

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.comwro te:
On Jul 26, 1:41 pm, gvrajku...@gmai l.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#<an chor>
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
2748
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 which case you can simply dim variables as the correct type and pass those into the sub(). >-----Original Message-----
7
2269
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 located these guys in the first place. In all fairness to them, their entire site is not riddled with pages that supress the Back button's function. But this one was. Can I override similar situations when they occur? Also, is this something...
6
10697
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. Let's say you select 1 of the items, and are properly redirected. You press the back button. I have three servers providing two different functionalities: 1. After pressing the back button, the item you selected in the dropdown is still selected.
3
5011
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"); Response.Write("<script>alert('"+message+"');</script>");
3
2606
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 java script. -- Paul G Software engineer.
1
7075
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 then response.redirect("LoginPage.aspx") But when i use logout to set Session("Login") = "" then redirect to LoginPage,
1
1815
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 comes to question page. I have about 20 questions. As soon the user login to the system, he should start answering. The system should remember the number of correct answers til the 20th question. I used session to hold the value of number of correct...
8
4746
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 fine, with radio buttons, selection lists, check boxes all coming back in the state they were in...
0
9586
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5298
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
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
3
2814
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.