Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using this
alert(window.history.current)
alert(window.history.previous)
alert(window.history.next)

but it always returns undefined on alert box. What's the problem?

Thanks.
Posted
Updated 20-Dec-10 18:40pm
v3
Comments
JF2015 21-Dec-10 0:27am    
Edited to add code formatting.

1 solution

As already discussed with you[^], above methods are IE specific and Firefox does not support them.

You would need to maintain a stack of URL's visited and use them based on your bac-forward. You cannot use browsers as Firefox does not support it.
 
Share this answer
 
Comments
niravsahayata 21-Dec-10 1:04am    
Hi sandeep thanks for this
history.go() is working fine with ie but these methods are also not working in ie.
i have one iframe on my page,on select option change event content on my iframe changes but url remain same,so how can i track history pages??
Sandeep Mewara 21-Dec-10 1:11am    
You should have explained all these earlier. Having an iframe and navigating is totally different scenario and you cannot track that via browser history!

You can understand now that posting the whole scenario and question helps both you and us.
niravsahayata 21-Dec-10 1:25am    
ok sir thanks again.
but what about history properties these are not working in ie.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900