473,320 Members | 1,828 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.

Communication between Java applet and javascript

Hello all,

let's me explains my long problem:

I'm doing an intranet with a media part. So im must be able to upload files on
a ftp server AND have a record of informations about this file and meta date in
a MySQL database, shown in a php page.

So the first thing i was doing was:

1/ * A HTML Form, with a <input type="file"> which was uploading the file to
the web server. And then, in the next action-php-page, using ftp functions from
php to upload to the ftp server. But this make upload the file 2 times, which
slow, and the user can't do anythig except waiting in front of a blanck loading
page.

=> no way

(BTW, the site admin refuse that the ftp server and the web server to be the
same computer)
So i tried something else:

2/ * A HTML form, the user enter meta data about the media, click next, and
then, a php page which loads a java applet an pass informations to it (by param
tags).
The applet have a browse button, and a go button, which start the transfert
(JDK 1.4.1) trough the URLConnection. The file is uploaded once, and there is a
progress bar, which is wonderful.

But now, i need the src_file information wich is the java applet. So i have two
options:

A/ I make a post to the webserver from the applet. But i'm using session
identification (needed for tracing users actions) and i'm gonna use SSL in less
than one month, so i think it would be complicated.

B/ I export the information from the java applet to javascript, and then to
HTML hidden field, so that the user can submit the full-hidden-filled form. But
i can't make LiveConnect works.

i'm under Mac OS X 10.2 (jaguar) so i need to make work LiveConnect on both
Safari 1.0 (v85.6), mozilla 1.5, and Mac OS IE (5.2).

After few hours on google, searching for informations and already working
liveconnect example, i'm in big doubt...

Is there any other way??

Thx for helping a desesperate developper...

--
david

Jul 20 '05 #1
2 2686
Ike
http://www.rgagnon.com/howto.html

"david" <pa*********@server.com> wrote in message
news:br**********@news-reader1.wanadoo.fr...
Hello all,

let's me explains my long problem:

I'm doing an intranet with a media part. So im must be able to upload files on a ftp server AND have a record of informations about this file and meta date in a MySQL database, shown in a php page.

So the first thing i was doing was:

1/ * A HTML Form, with a <input type="file"> which was uploading the file to the web server. And then, in the next action-php-page, using ftp functions from php to upload to the ftp server. But this make upload the file 2 times, which slow, and the user can't do anythig except waiting in front of a blanck loading page.

=> no way

(BTW, the site admin refuse that the ftp server and the web server to be the same computer)
So i tried something else:

2/ * A HTML form, the user enter meta data about the media, click next, and then, a php page which loads a java applet an pass informations to it (by param tags).
The applet have a browse button, and a go button, which start the transfert (JDK 1.4.1) trough the URLConnection. The file is uploaded once, and there is a progress bar, which is wonderful.

But now, i need the src_file information wich is the java applet. So i have two options:

A/ I make a post to the webserver from the applet. But i'm using session
identification (needed for tracing users actions) and i'm gonna use SSL in less than one month, so i think it would be complicated.

B/ I export the information from the java applet to javascript, and then to HTML hidden field, so that the user can submit the full-hidden-filled form. But i can't make LiveConnect works.

i'm under Mac OS X 10.2 (jaguar) so i need to make work LiveConnect on both Safari 1.0 (v85.6), mozilla 1.5, and Mac OS IE (5.2).

After few hours on google, searching for informations and already working
liveconnect example, i'm in big doubt...

Is there any other way??

Thx for helping a desesperate developper...

--
david

Jul 20 '05 #2

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

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
3
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial...
2
by: decoy | last post by:
Hi all, Does anyone know whether it's possible for Java (signed) applets to call javascript functions and for javascript to call public methods in the applet code. I know that the latter is...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
by: news.onet.pl | last post by:
I hava a problem with communication between Java/Corba server based on JDK ORB with Java/Corba client (applet) based on the same ORB. I`m using IOR to localize server. client`s ORB i initialize...
0
by: news.onet.pl | last post by:
I hava a problem with communication between Java/Corba server based on JDK ORB with Java/Corba client (applet) based on the same ORB. I`m using IOR to localize server. client`s ORB i initialize...
1
by: 418928 | last post by:
Hi everybody, I would like to know if the way of communicating with an applet from Javascript is standard (valid for all web browsers). I know that JSObject (Applet->javascript) is not...
1
by: Daniel Pitts | last post by:
I only need to support Firefox 3 at the moment, so any advice can be specific to that. I have a Java Applet, lets call it HelperApplet. It has one method of importance: public Object...
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: 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.