innerHTML of frame with an FTP location?

I need to access the "document.body.innerHTML" of a frame when the frame location is an ftp site.

I can do it as long as the location of the frame is an http page, but when I make it an ftp site, the frame no longer has a "document" object.

Here is the code that is giving me problems:

** Main Frameset Page **
<html>
<head>
<script language="javascript">
<!--
function logon(user,pw,server) {
  bottomframe.location = 'ftp://' + user + ':' + pw + '@' + server;
  return;
}
function check() {
  alert(bottomframe.document.body.innerHTML);
}
//-->
</script>
</head>

<frameset name="frameset" rows="*,100">
  <frame name="topframe" src="logon.html">
  <frame name="bottomframe" src="blank.html">
</frameset>


** logon.html Page **
<html>
<head>
</head>
<body>
<form name="logonForm" action="SelectPage.html">
<b>Logon to Web Site</b>
<br>
Username:<input name="username" type="text">
<br>
password:<input name="password" type="password">
<br>
Web Server:<input name="server" type="text">
<br>
<input type="button" value="Logon" onClick="parent.logon(document.logonForm.username.value,document.logonForm.password.value,document.logonForm.server.value);">
<br>
<input type="button" value="Show innerHTML" onClick="parent.check();">
</form>
</body>
</html>

** blank.html Page **
<html>
<head>
</head>
<body>
The innerHTML is here
</body>
</html>
garthmillerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

thirdCommented:

"I can do it as long as the location of the frame is an http page"

not all http page but only pages that you own or pages that grants you full access. try setting the bottom frame to www.yahoo.com and see what i mean.

this also applies to your problem.
0
stevenmoffatCommented:
Ive read through the script

Can you give broad outline of what you are trying to acheive??

Im assuming you want authorised users the ability to download certain files????

steven M
0
garthmillerAuthor Commented:
third:

You are right (although the error message for pages that I don't own says "access denied" instead of "no such interface supported" which is what it says for ftp pages).

steven M:

You are right, I want to make an HTML editor using javascript.  This means I need the browser to be able to upload and download files.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

stevenmoffatCommented:
www.spidergen.com

cost about uk £250 for studio version and £100 for normal client, this does what you want to do here

unless this is a project and you want to compete with these guys, or have other restrictions

i figure a days work compared to offshelve solution good odds

stevenM
0
thirdCommented:
"no such interface supported"

therefore these statement generally means that accessing documents from http to ftp is not supported by browsers although http can view the page but is on a protected mode (i.e. readonly).

for creating javascript-based HTML editor, you will find this link very useful,

http://www.javascript-page.com/easyhtml/
0
garthmillerAuthor Commented:
I've discovered a way to get the contents of a file from a web server using javascript.  Here is what my new logon function looks like.

function logon(user,pw,server) {
  // the user and pw variables are not needed
  // because this uses HTTP instead of FTP,
  // the server variable can contain a complete URL.
  var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  xmlHttp.open("GET", server, false);
  xmlHttp.send();
  bottomframe.document.body.innerHTML=xmlHttp.responseText;
 return;
}
0
stevenmoffatCommented:
is the source file you are altering under your control??? ie can it always be xml ??
0
ahosangFinance Systems DeveloperCommented:
This question has been abandoned. I will make a recommendation to the moderators on its resolution in a week or so. I appreciate any comments that would help me to make a recommendation.
 
In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care
 
ahosang
0
garthmillerAuthor Commented:
ahosang:

I never got any help with this.  Make whatever recommendation you think best.

0
ahosangFinance Systems DeveloperCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
ahosang
EE Cleanup Volunteer
0
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.