iPowerWeb Hosting
 
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Web Directory

Go Back   Webmaster Forum > Designing and Developing Websites > Programming > Ajax / Javascript

Ajax / Javascript Discussions and help on Ajax and Javascript coding.

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2007, 01:28 PM
technoguy technoguy is offline
WMG Citizen
 
Join Date: Mar 2007
Posts: 436
iTrader: (0)
technoguy is on a distinguished road
Default Disable back button of browser

Can anyone tell me how can I disable back button of web browser using javascript? It should work with both firefox and internet explorer. I do not want to allow people click on back button and visit previously visited pages.
Reply With Quote
Sponsored Links
Register and sign in to hide this ad block

  #2 (permalink)  
Old 03-14-2007, 06:38 PM
Tripy Tripy is offline
WMG Newcomer
 
Join Date: Mar 2007
Posts: 31
iTrader: (0)
Tripy is on a distinguished road
Default

Nope, you cannot do that.
The browser are simply not made to allow this type of behavior.
Reply With Quote
  #3 (permalink)  
Old 03-14-2007, 06:41 PM
alphaRomeo alphaRomeo is offline
WMG Resident Alien
 
Join Date: Mar 2007
Posts: 242
iTrader: (1)
alphaRomeo is on a distinguished road
Default

Well, I have seen it done with Gmail. If you are logged in at Gmail and checking your inbox or reading emails, clicking on the browser back button does not work. You can click as much as you want on the back button, it simply does not do anything.
__________________
Advertise your websites on my signature. $5/month.
Reply With Quote
  #4 (permalink)  
Old 03-14-2007, 09:38 PM
Tripy Tripy is offline
WMG Newcomer
 
Join Date: Mar 2007
Posts: 31
iTrader: (0)
Tripy is on a distinguished road
Default

heh?

Just tried it.
1) Go to www.av.com
2) go to gmail -> automatically logged in
3) Click the back button -> Back on altavista page

So, I don't see how it could be.
Except if gmail is the first site you visit with your browser window/tab.
Then the back will have no effect.

And as the back having no effect inside the gmail site, thats another thing.
It's due to the AJAX design of the sites. Look there for an explanation:
http://www.contentwithstyle.co.uk/Articles/38/
Reply With Quote
  #5 (permalink)  
Old 03-15-2007, 02:37 AM
technoguy technoguy is offline
WMG Citizen
 
Join Date: Mar 2007
Posts: 436
iTrader: (0)
technoguy is on a distinguished road
Default

I have seen it on banking site of icicibank.com. I think they are trapping back button and when someone click it. They just kick out the user.

I want to have facility like that.
Reply With Quote
  #6 (permalink)  
Old 03-15-2007, 02:53 AM
technoguy technoguy is offline
WMG Citizen
 
Join Date: Mar 2007
Posts: 436
iTrader: (0)
technoguy is on a distinguished road
Default

Hello friends

I have got solution for this like this. I hope you will find it useful too.

HTML Code:
<script>
if (history.length > 0)
history.go(+1);
</script>
If you find any other solution please send me too.
Reply With Quote
  #7 (permalink)  
Old 03-15-2007, 04:15 AM
swapnil90 swapnil90 is offline
WMG Resident Alien
 
Join Date: Mar 2007
Posts: 100
iTrader: (0)
swapnil90 is on a distinguished road
Default

There is no use disabling the script as people can anytime use the backspace button or alt + left

And even if you can disable that, it is not a good idea since they will have trouble during page views

Instead of disabling it, you can make your site a bit more interesting so that people would never use the back button...
Reply With Quote
  #8 (permalink)  
Old 03-15-2007, 04:55 AM
technoguy technoguy is offline
WMG Citizen
 
Join Date: Mar 2007
Posts: 436
iTrader: (0)
technoguy is on a distinguished road
Default

I am creating it for security pupose of client's website. If you look at ICICIBank.com site, and if you have an account there you can see that how nicely they have used it.
Reply With Quote
  #9 (permalink)  
Old 03-15-2007, 05:03 AM
alphaRomeo alphaRomeo is offline
WMG Resident Alien
 
Join Date: Mar 2007
Posts: 242
iTrader: (1)
alphaRomeo is on a distinguished road
Default

Quote:
Originally Posted by Tripy View Post
heh?

Just tried it.
1) Go to www.av.com
2) go to gmail -> automatically logged in
3) Click the back button -> Back on altavista page

So, I don't see how it could be.
Except if gmail is the first site you visit with your browser window/tab.
Then the back will have no effect.

And as the back having no effect inside the gmail site, thats another thing.
It's due to the AJAX design of the sites. Look there for an explanation:
http://www.contentwithstyle.co.uk/Articles/38/
What I mean is that you have to be in Gmail, browsing emails and then clicking the back button. Nothing will happen.
If you have just entered Gmail and click the back button, it will work in that case. However, after you have navigated through Gmail, you can NOT go back.
__________________
Advertise your websites on my signature. $5/month.
Reply With Quote
  #10 (permalink)  
Old 03-15-2007, 05:08 AM
swapnil90 swapnil90 is offline
WMG Resident Alien
 
Join Date: Mar 2007
Posts: 100
iTrader: (0)
swapnil90 is on a distinguished road
Default

Quote:
Originally Posted by technoguy View Post
I am creating it for security pupose of client's website. If you look at ICICIBank.com site, and if you have an account there you can see that how nicely they have used it.

Didnt think about that...thos people are quite intelligent I guess...

Nice idea...Maybe ill try it out on my blog too...
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT. The time now is 11:45 AM.



Freelance Web Designers
Work At Home Forum
Ad Marketplace
Online Deals and Bargains
iPowerWeb Hosting Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0