Solved

cannot write to another frame

Posted on 1998-03-28
3
160 Views
Last Modified: 2012-05-04
I have a page with two frames; One frame - call it "A" - contains source
loaded from a CGI server. The other frame, "B", contains source
residing on the local machine.
I want A to use javascript to write to B, using document.write. Now sometimes, depending on which version
of Netscape I am using and which machine it is on,
this is ok. But sometimes it gives me an error like
"cannot access documents at <Local URL>" or something
like that.
Surely someone knows what is causing this? Am I doing
something conceptually bad, is there a better way to
accomplish this?

I will post more information about the problem if needed.

Thanks.
0
Comment
Question by:Rajuna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:crab1
ID: 1278919
Have you tried window.top.frame[B].document.write ? Or is that what you are having dificulty with?
0
 
LVL 3

Accepted Solution

by:
percyn earned 100 total points
ID: 1278920
This is a "security feature" addes to the 4th generation browsers. You need to set the "document.domain" property of both frames to a common URL.

Say that the CGI server is cgi.mydomain.com and the local webserver is www.mydomain.com. Then you need to set the document.domain to "mydomain.com" . Refer to Netscape's Javascript guide for more help.
0
 

Author Comment

by:Rajuna
ID: 1278921
This looks like it's on the right track. But there is just one snag still:
frame B is on a local machine, that is, a file: URL. when I examine
the document.domain property of this page, it is "" - the empty string.
Therefore I cannot possibly set it to a common domain as the
CGI server. What I want is for Netscape to recognize the hotname
of the local machine and let me set the domain as a part of that.
How???!!!

Please help, thanks in advance, I will give you the points for the answer
so far.

0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Node.js 11 68
JS to redirect to prev page 8 40
Expanding/Collapsing Tree on SharePoint List 29 57
Error Handler 8 37
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question