Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Ive been challenged and am thinking i cant solve the problem.
Old 03-23-2008, 05:54 PM Ive been challenged and am thinking i cant solve the problem.
Novice Talker

Posts: 8
Name: Lance
Trades: 0
Im a C++ developer that has been asked to create a WA that will allow the following to happen. First off, there are two frames on the page and a banner at the top. After the cgi based login, the new page on the remote server loads in a new browser window. the left frame, is the users local computer in their root design directory as specified by our application made in C++. The right frame is out server directory to upload the files. without paying for the code or helpful hints, how do we drag and drop files using only js and html from the local pc to the remote server and visa versa. The sooner I can do this, the less stress is put on my job.
LanceWassing is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-23-2008, 06:55 PM Re: Ive been challenged and am thinking i cant solve the problem.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Is a WA a "web agent" ? Just a curiosity, nothing crucial here.

Simple answer: you cannot.

detailed answer: you have to understand that using only html and javascript, you cannot make any file upload.
HTML is a page description language, a bit like xml.

You have to use a server side language (php, jsp, asp.net or whatever other technology) to handle your file transfer.

What html let you do, is to encapsulate the binary data of 1 file into a POST request field. So, if you need to upload 2 files, you need 2 <input type="file"> with different names.

That in mind, you can create an FORM request with the files embedded in javascript by using DOM functions (it's pretty easy even), but then, you will need to add something on your server to put the files with the right names at the right place and to re-create the directory structure.

The easiest way: create an archive on the local computer, send it to the server and unpack the archive using a server side language.
The C++ way: create a secured deamon on your server, listening to a port, and stream the datas to your deamon from your c++ app
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-23-2008, 07:58 PM Re: Ive been challenged and am thinking i cant solve the problem.
Novice Talker

Posts: 8
Name: Lance
Trades: 0
Thats the argument i had with my boss, and thought that... but now that its verified... i can tell my boss to flip. much appreciated, as my expertise is asm and c/c++ (old skool style) lol...

well thanks for the post
Lance Wassing
LanceWassing is offline
Reply With Quote
View Public Profile
 
Old 03-23-2008, 09:09 PM Re: Ive been challenged and am thinking i cant solve the problem.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
You're welcome.

And asm is not so old school. I used to do some when I was in formation.
Around, hmmm, 12 years ago...
Never got above C, though. But heard so many complaints from c++ devs that it did not gave me any curiosity to look by myself.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-24-2008, 01:31 PM Re: Ive been challenged and am thinking i cant solve the problem.
Novice Talker

Posts: 8
Name: Lance
Trades: 0
c++ not so bad, however you need to remember your standard and addon libraries, there components, and uses etc. can get frusterating but if you know c, c++ isn't that far of jump for you.
LanceWassing is offline
Reply With Quote
View Public Profile
 
Old 03-26-2008, 04:35 PM Re: Ive been challenged and am thinking i cant solve the problem.
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
This suggestion is pure evil but....

If one frame is open to the user's drive, and the other pointing to an FTP site (most browsers support the FTP protocol), then a user might be able to drag file between on and the other.
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 03-26-2008, 04:45 PM Re: Ive been challenged and am thinking i cant solve the problem.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
Originally Posted by willcode4beer View Post
This suggestion is pure evil but....

If one frame is open to the user's drive, and the other pointing to an FTP site (most browsers support the FTP protocol), then a user might be able to drag file between on and the other.
It's evil for open source advocate, I'd say.
I believe only IE support this. At least, firefox doesn't, and I don't know about opera nor safari
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-26-2008, 04:55 PM Re: Ive been challenged and am thinking i cant solve the problem.
VirtuosiMedia's Avatar
Web Design Made Simple

Posts: 1,228
Trades: 0
Quote:
Originally Posted by willcode4beer View Post
This suggestion is pure evil but....

If one frame is open to the user's drive, and the other pointing to an FTP site (most browsers support the FTP protocol), then a user might be able to drag file between on and the other.
So all he's asking about is a browser-based FTP? This might be a dumb question, but how can you detect the local computer using PHP? Or can you?
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 03-26-2008, 05:09 PM Re: Ive been challenged and am thinking i cant solve the problem.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Yes you can, but this is not an option, as it had to be done with HTML and javascript only.
If no server side languages are available, ftp is effectively the only solution I see .
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-26-2008, 05:39 PM Re: Ive been challenged and am thinking i cant solve the problem.
VirtuosiMedia's Avatar
Web Design Made Simple

Posts: 1,228
Trades: 0
Okay, never mind...I just found all the ftp functions in PHP that I didn't know about before.
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Reply     « Reply to Ive been challenged and am thinking i cant solve the problem.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.88970 seconds with 12 queries