B
banyan
Hi,
I want to supply the previous page in current window with a string from
current page and the content in the previous one is changed
accordingly. I use <DIV> innerHTML to accomplish the DHTML and run
below JS in current page when deciding to go back.
window.history.go(-1);
document.getElementById('ObjA').innerHTML='my string';
But the "document" still refers to current page, even though I add a
document.clear() and location.replace() statements right after
window.history.go(-1).
I find the archieve of this Group mentions a few solutions for a
similar problem, however they don't seems to work for my scenario.
The first solutin is to append the string to the previous URL. But my
first page was actually loaded from a HTML file and there is no CGI
program to receive the string.
The second solution is to use cookie to pass the infor. It seems the
string is to saved in the "document" object though. Since the
"document" is not updated, I won't be better off. Another problem is
this solution requires cookie to be turned on in the browser.
The third one is to use frame, which is not desirable nowadays if I am
not wrong.
Any input is appreciated.
Thanks,
Zhigao
I want to supply the previous page in current window with a string from
current page and the content in the previous one is changed
accordingly. I use <DIV> innerHTML to accomplish the DHTML and run
below JS in current page when deciding to go back.
window.history.go(-1);
document.getElementById('ObjA').innerHTML='my string';
But the "document" still refers to current page, even though I add a
document.clear() and location.replace() statements right after
window.history.go(-1).
I find the archieve of this Group mentions a few solutions for a
similar problem, however they don't seems to work for my scenario.
The first solutin is to append the string to the previous URL. But my
first page was actually loaded from a HTML file and there is no CGI
program to receive the string.
The second solution is to use cookie to pass the infor. It seems the
string is to saved in the "document" object though. Since the
"document" is not updated, I won't be better off. Another problem is
this solution requires cookie to be turned on in the browser.
The third one is to use frame, which is not desirable nowadays if I am
not wrong.
Any input is appreciated.
Thanks,
Zhigao