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

Access 3rd-frames in Firefox or MSIE

P: n/a
Hello All JS-Experts,

Is it possible to access 3rd-frames in Firefox or MSIE? I would like to
write a html-based test framework. There are two frames. One is the test
console and the other is a test box. However I failed to read contents
of a Web page, when it comes from a 3rd-domain.

Is it really impossible?

--
Best regards
Xu, Qian (stanleyxu)
http://stanleyxu2005.blogspot.com/
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
SAM
Xu, Qian a écrit :
Hello All JS-Experts,

Is it possible to access 3rd-frames in Firefox or MSIE? I would like to
write a html-based test framework. There are two frames. One is the test
console and the other is a test box. However I failed to read contents
of a Web page, when it comes from a 3rd-domain.

Is it really impossible?
You can say it is.

cross-domain is not allowed !

you can display a foreign page in a frame (or iframe or window) but you
can't interact with it :-(
the foreign page will not be readable by JS.
All you can try to do it is to download it with php, and there
(server-side) to try to read it, extract datas or tags and then to send
results to browser (eventually in JS variables).

--
sm

Jun 27 '08 #2

P: n/a
Xu, Qian wrote:
Is it possible to access 3rd-frames in Firefox or MSIE? I would like to
write a html-based test framework. There are two frames. One is the test
console and the other is a test box. However I failed to read contents
of a Web page, when it comes from a 3rd-domain.

Is it really impossible?
Inside of the browser sandbox it is not possible but you could try to
write a HTML application (HTA) on Windows, that way your HTA code can
access the frame. See
http://msdn.microsoft.com/en-us/libr...71(vs.85).aspx
Or learn how to write Firefox extensions, then your extension code can
access the HTML documents loaded in browser windows or frames.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.