Hmm.. So you want to have the first click from any window that's just been opened to do something different than anything else?
You could modify (in javascript) all links on the page to add a parameter that sends that info over to the server side.
Normally, the server will not know or care which window is requesting what. That way, people can - for instance - copy the url from one window to the next without surprises. If you want to break that, you'd better have a good reason for doing so.
| [reply] |
is there any other work around to find if the browser window is new or old? By old i mean to say is that other links have already been visited on it.
What does that mean? Do you mean that a page is considered old if some of the links on it have been visited or if all of them have? In both cases this seems a different problem from the one you described in other posts. You should really try to describe what you're after more explicitly and in terms of UI, with no reference to the underlying technology - e.g.: "I want a user to click on a link and upon clicking this, that and that other thing must take place." Then I'm sure that people with experience in web development could successfully help you.
| [reply] |
by new i meant that the window opened up does not have any history before that. if a link is opened in a new window then that window is called new. if it is opened in the same window as the current page, the window is called as old.
| [reply] |
Well, then the history is a client side thingie. It can be accessed through a client side language, like JavaScript. Then you can use JavaScript itself to modify the page on the fly or, if you want the job to be done on the server you can have it say post some relevant info upon which the server will serve a suitable page. Or else you may have the client communicate with the server with AJAX techniques. That's pretty much everything that's to it. But then again... I for one would find your site's behaviour to be very annoying: I often right-click-open-in-new-tab links instead of plain clicking them. Why should the page I get to be different across the two cases?
| [reply] |