473,320 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ftp via a form on page html ??

To reach their accompte ftp via a page html, I place a form for our
customer on a page. I found this code. But it doesn't work because I
reach the base of the server and not directly the own customer
accompte?? I have to change something on my ftp server or on the html
page?? Thanks. pascal joseph

<html>
<head>
function Login(form) {
var username = form.username.value;
var password = form.password.value;

if (username && password) {
var ftpsite = "ftp://" + username + ":" + password + "@ftp.pcl.ch";
window.location=ftpsite;
}
else {
alert("Merci d'entrer un ID et un mot de passe.");
}
}
</script>
</head>
<body>
<form name="login" method="get" action="#">
Login:<input type=text name="username" size=6>
Mot de passe:<input type=text name="password"
size=6>
<input type=button value="Login!" onClick="Login(this.form)">form>
</body>
</html>
Jul 23 '05 #1
2 2919
Hey Pascal,

You can specify a directory:

For example:

var ftpsite = "ftp://" + username + ":" + password +
"@ftp.pcl.ch/home/"+username;

Vincent

pascal Joseph wrote:
To reach their accompte ftp via a page html, I place a form for our
customer on a page. I found this code. But it doesn't work because I
reach the base of the server and not directly the own customer
accompte?? I have to change something on my ftp server or on the html
page?? Thanks. pascal joseph

<html>
<head>
function Login(form) {
var username = form.username.value;
var password = form.password.value;

if (username && password) {
var ftpsite = "ftp://" + username + ":" + password + "@ftp.pcl.ch";
window.location=ftpsite;
}
else {
alert("Merci d'entrer un ID et un mot de passe.");
}
}
</script>
</head>
<body>
<form name="login" method="get" action="#">
Login:<input type=text name="username" size=6>
Mot de passe:<input type=text name="password"
size=6>
<input type=button value="Login!" onClick="Login(this.form)">form>
</body>
</html>


Jul 23 '05 #2
pascal Joseph wrote:
To reach their accompte
What is that?
ftp via a page html, I place a form for our customer on a page.
I found this code. But it doesn't work [...]


Don't use it, do that server-side. Not every customer may have or want
client-side script support available, and you annoy those who could become
customers but are not going to due that restriction, too.
PointedEars
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
3
by: Harvey | last post by:
Hi, I try to write an asp query form that lets client search any text-string and display all pages in my web server that contain the text. I have IIS 6.0 on a server 2003. The MSDN site says...
4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
10
by: Kathy Burke | last post by:
HI. in asp.net app, I have an xmlDocument that I transform to the client html. Using xsl I create a few textboxes to capture user input. Each of these are related to <data> elements in the xmlDoc....
0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
2
by: Esa | last post by:
Hi, I'm having problems with one strange web system where submitting an application and making queries about its handling status require a series of form submits and response parsing - all in...
4
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I...
4
by: Cerebral Believer | last post by:
Hi I need help! Forgive me I am a PHP newbie. I have a small script that enables me to send a form from an HTML page. I want to use the HTML formatted form because the design of my website is...
19
by: Coward 9 | last post by:
HI, I saw in an example hello.aspx, there is a <form tagbeing used like <form runat="server> I search all html tag references and could NOT find "runat" attributes for <formtag. which...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.