Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: open
i have this problem with new windows.
when i open a new window from a link say
window.open("home.html", "width=400", "height=400" "toolbar=yes" "location=yes","directories=yes","status=yes","menubar=yes","scrollbar=yes")
i get to open a new window with the dimensions but not the history of the previous window.
say my previous window has a page email.html from which i opened a new window called thanx.html......
now what i want to do is retain the history of the window that opened the thanx.html window.
can i do that plz help,
If by preserve the history you mean overwrite or populate the new window's history with the parent window's history, the answer is no, you can't do that. You can't even access the content of the previous history.
However, if you're only concerned about the visitor's history on your site, and if you are tracking the session with cookies, session ID's, etc., then you could, with a bit of effort, import that history information from your site into the new page for your user.
However, you still wouldn't be changing the actual history of the new window, or making the Back Button on this window echo the parent window's Back Button. And you might scare a few people with the feeling that you are spying on them.
Why not load thanx.html into the same window as email.html?
thanx for the reply.......
my problem relates to only my site...... i need to retain the history coz i usually open pages in fullscreen mode and i wanted to retain history so that i can put the back and forward buttons in the pages so that the ppl who visit can go back and forth in my site.(as the fullscreen mode dosnt have any buttons).
if u have the procedure or the script to achieve this plz do send me.
I have never done anything like this myself, I only mention it because it is at least possible. It would depend first of all on what server side languages you can use. But there would also be many odd situations to take into account: people whose browsers are not taking cookies or letting you track them for some reason; people who visit many many of your pages first, making a very large record of back links to be written on the page.
Now that I give it more thought, I think it's too much to deal with for almost all situations - it's not even close to the kind of issue where you can just add one simple script.
I think it would be better to give your visitors some good, standard navigation links for your site on the page, and include a "Close this window" button so they don't think they are trapped.