Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ftp login form for Netscape 6 and IE5

Status
Not open for further replies.

thewebgeek

Technical User
Jan 8, 2001
22
0
0
US
When logging into an ftp site, one usually puts their ID and password in the following format )minus the "/s" around the @ symbol):
ftp://userID:password/@/myftpsite.com

The way things are now, one has to go through a rather cumbersome login process in both Netscape and IE5. Users do not normally know the login process for these browsers, so I want to create a form on an html page that provides a nice interface for logging in.

Here is the code I have so far:

<script language-&quot;javascript&quot;>
<!--
function enter()
{
user = document.frm.user.value;
pass = document.frm.pwd.value;
window.location = &quot;ftp://&quot;+user+&quot;:&quot;+pass+&quot;@phoenixsoftware.com/pub/&quot;;
}
//-->
</script>


Now I'm getting errors in both netscape and IE5.
 
Try getting rid of the semicolon in the middle of the statement where you build the href.
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Funny, I looked at the code on my original HTML page and the semicolon is not there. It , along with other stuff, was inserted into my message when I posted. Perhaps just giving the URL to the login page would be best.

 
Try window.location.href instead of just window.location.
I missed that the first time thru.

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
window.location.href and window.location are the same thing. luciddream@subdimension.com
 
well, window.location.href worked in IE5, but not in Netscape. In Netscape 4.7, I am passed through to the ftp site, but not given the permissions needed to view certain files. IN Netscape 6, I just get an error that says:

Error: enter is not defined.
 
My guess is it is the submit button that passes the variables. Here is the code that calls the function named enter.

<input type=&quot;button&quot; onclick=&quot;enter()&quot;value=&quot;submit&quot; name=&quot;Button&quot;>

 
it appears that Netscape does not like

onclick=&quot;enter()&quot;

When enter () has variables between the parentheses.

Am I talking to myself?
 
Evidently this problem is beyond the scope of anyone here...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top