?
Solved

Can we catch the  browser (IE) history count?

Posted on 2008-02-12
7
Medium Priority
?
692 Views
Last Modified: 2012-06-21
I am handling some frame based application.. where I can count / length the history details... I just want to alert/fire some message when the history raising from 10 to 11 th page..?

Probably I will be moving the pages..so i have the history details on my browser .. also i could get the history length ...

Is it possible to catch the history  and display some alert message ??

So How to catch the 11th history...? moving from 10th count/length
0
Comment
Question by:Loganathan Natarajan
  • 4
  • 3
7 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 1500 total points
ID: 20873259
Keep track yourself

If you count history, you need to know when it was empty
So if you hae 100% control, you can do

<body onUnload="if (history.length==10) alert('Leaving the 10th page')">
0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 20873326
You are right mplungjan. But my issue is, I am handling page navigation with iframe. I am adding attribute to iframe like

frame1.Attributes.Add("onload", "javascript:alert(history.length);");

This executes only after the page is loaded completely. But Browser increments the history length well in advance. How to do that in my iframe page?

The real issue, if my page have more images, the above javascript is getting executed after all the images are loaded. But the browser is incrementing the history length before that. How?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20873485
If you are handling it, count where you handle it.
What is the actual issue here. What are you trying to achieve?

Michel
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 20873500
when the history.length is being updated, i am able to get the length only after <iframe loaded completed ... Is it possible to get it before (i.e when the iframe page loads ...itself...

any idea?

(On the main page, I am loading the iframe and doing this work... trying to load different iframes on the main page...
0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 20882076
any other comments?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20882395
No. Sorry. I do not understand your issue.
If you have full control over what you load, then I do not see a need to look at the history object
0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 20882416
Now, I have set it as Timer ... it is ok now... ok.. i will close this topic .. i got something to do.,
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question