Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2004, 05:27 PM
Authorized User
 
Join Date: Sep 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to renee_santoscoi
Default upload with javascript

hi,
I need upload files on my website, but I only can use javascript, is it possible?, because the files uploaded must be stay on the webserver?
 thanks.

renees
__________________
renees
 
Old June 4th, 2004, 06:28 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

>> but I only can use javascript

The only client-side language you can use is JS, or the only language period?

JavaScript runs on the client's machine (the one that is visiting your site). It *cannot* directly communicate with the server (i.e. passing files). To do uploads you must have a server-side language (PHP, ASP, etc.).

Basically, no, JS cannot do uploads. Grab yourself a server language.

Hope this points you in the right direction,

Snib

<><
 
Old June 5th, 2004, 02:11 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

 >> but I only can use javascript

alternatively, You can use javascript at the server side to upload the files.

Om Prakash
 
Old June 5th, 2004, 07:33 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

JS on the server requires the server techonology ASP, which not all hosts provide. Client-side JS is always available, but I took "only can use JS" to mean no server language.

Snib

<><
 
Old June 7th, 2004, 09:06 AM
Authorized User
 
Join Date: Sep 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to renee_santoscoi
Default

Thanks for all your comments. But in this case I need to "coding" only with html and javascript, I can't use any other language. :(
I was thinking: Is possible to use and ftp for the upload?
:)

renees
 
Old June 7th, 2004, 11:27 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I don't think there's a way to get and put files without a server language, unless you give the client anonymous access to your FTP server, and then the client has to know how to use it.

HTH,

Snib

<><
 
Old June 7th, 2004, 01:21 PM
Authorized User
 
Join Date: Sep 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to renee_santoscoi
Default

security fails, right?, ok. thanks you.

renees





Similar Threads
Thread Thread Starter Forum Replies Last Post
stop current javascript function using javascript sakthi Javascript 3 June 2nd, 2008 03:30 PM
Whole Folder upload(Multi file Upload) ramasamy_rams XML 1 September 9th, 2005 12:43 PM
"text/javascript" and "javascript" rupen Javascript 1 June 24th, 2005 07:20 AM
PURE asp upload problem ., alert from Javascript kasanar ASP.NET 1.0 and 1.1 Professional 0 February 19th, 2005 10:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.