You can't modify it via perl, since then all pages will give you the same result. You have to test for the history length via javascript, and then modify the links.
edit: this does sound like an XY problem. Depending on what you want to achieve, there may be better options.
| [reply] |
I read the XY problem :). Thank you for your replies. Basically I want to know if a page is opened in a new window or not. If yes, then I want to do some processing before it is outputted on the screen. My pages are like: a.pl, b.pl, c.pl. If c.pl is opened from a link in a.pl in a new window, then during the processinf of c.pl i should come to know that so that i can append some extra stuff in c.pl output. That was the reason I was trying to find out if the page is in new window using Perl and not Javascript. So that if I can find out using Perl prior to outputting it, then I can modify it suitably.
Now since you have said that I can modify using javascript, I can do the modifications in a.pl so that when c.pl is loaded in new window via a.pl I come to know about it. But what are the modifications required. Please guide me.
Thank you very much,
Anant
| [reply] |
| [reply] |