By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

Question: Does javascript have acces to source code of previous page...

P: n/a
Does javascript have acces to source code of previous page when I open a
page from the same domain with
window.open("new_page_with_script","_self","");?
window.opener.document.innerHTML doesn't work ;(
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
SzokU wrote:
Does javascript have acces to source code of previous
page when I open a page from the same domain with
window.open("new_page_with_script","_self","");?
I doubt that because previous variables and functions are lost when you
display another document within the same container object (usually a window
or frame).
window.opener.document.innerHTML doesn't work ;(


Define: doesn't work.
Which error messages are displayed in which user agent(s)?

But maybe you're just violating the Same Origin Policy.
PointedEars

Jul 20 '05 #2

P: n/a
I have the error message in page:
window.opener.document is null or not an object
that you have probably right here: "[...] previous variables and functions
are lost when you display another document within the same container object
(usually a window or frame) [...]" because when I open page with target
"_blank" not "_self" it works and I can read or modify opener page... ;)
ok, thanks! ;)
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.