Accessing frames from another problem

J

joealey2003

Hi...

The javascript "alert(top.main.document.title);" or
"alert(parent.main.document.title);" does NOT work when the frame
src="http://www.otherdomain.com". If src="mypage.html" it does work.

I checked and tried with lots of pages that has the <title> stuff like
www.google.com and it does not work.

Why? Any hint?

btw... here goes the html of the frames page...
//--------------------------------------------------------------------------//
<html>

<head>
<title>New page 1</title>
</head>

<frameset rows="64,*,64">
<frame name="upper" scrolling="no" src="upper.html" noresize
target="content">
<frameset cols="150,*">
<frame name="content" src="content.html">
<frame name="main" src="http://www.google.com">
</frameset>
<frame name="bottom" scrolling="no" noresize target="content">
<noframes>
<body>

<p>Your browser sucks! LOL!</p>

</body>
</noframes>
</frameset>

</html>
//------------------------------------------------------------------------------------------------------------------------------
 
J

joealey2003

(e-mail address removed) said the following on 7/11/2007 12:53 AM:



Of course as one is from your domain, and the other isn't. Nothing in a
document that isn't from your domain is accessible to you. Its a part of
JS life you accept and move on.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?

Thanks a lot Randy! I won't forget that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top