Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OT][RIS] Chiamare un metodo javascript da un'applet java
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
matttions
Guru
Guru


Joined: 19 Jul 2004
Posts: 338

PostPosted: Sat May 28, 2005 11:05 am    Post subject: [OT][RIS] Chiamare un metodo javascript da un'applet java Reply with quote

Questo argomento è un pò OT, tuttavia il programmino in questione girerà su un server gentoo quindi ...

Sapete come si può chiamare un metodo javascript da un'applet java?

ho sbattutto la testa in giro per la rete ma per ora non ho trovato nessuna soluzione funzionante.. e mi sono detto...il pozzo di scienza è alla fine il forum gentoo !!!
quindi ecco quà la richiesta..

idee?

.azie

mat .
_________________
gentoo ... l'unico pinguino da corsa


Last edited by matttions on Mon May 30, 2005 2:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
stefanonafets
l33t
l33t


Joined: 10 Feb 2003
Posts: 644

PostPosted: Sat May 28, 2005 2:51 pm    Post subject: Reply with quote

Quote:
Questo argomento è un pò OT


No, mi sa che sei mooolto ot... :roll:
Cmq personalmente non saprei esserti di aiuto.

Prova a cercare un forum che tratta programmazione, sapranno sicuramente esserti + di aiuto...

(senza rancore)
_________________
registered Linux user number #411324
sed 's/ke/che/g'

<The Deployment Slave is initializing>
Back to top
View user's profile Send private message
ProT-0-TypE
Veteran
Veteran


Joined: 20 Dec 2003
Posts: 1624
Location: Cagliari

PostPosted: Sat May 28, 2005 6:17 pm    Post subject: Reply with quote

toglietevi l'UTF8 plz! :-D
_________________
[Vuoi guadagnare navigando?]
Back to top
View user's profile Send private message
matttions
Guru
Guru


Joined: 19 Jul 2004
Posts: 338

PostPosted: Mon May 30, 2005 8:21 am    Post subject: Reply with quote

Ok .. grazie per le risposte :-D ...

Qualcuno ha qualche link di siti che trattano di programmazione con una community così vivace e piena di risorse tipo questa :-D

L'argomento è ostico e quindi serve la risposta di very hacker :-D

.azie ..

ciauz:-)
ps.: ma lo standard non è l'UTF-8 ? :-D
_________________
gentoo ... l'unico pinguino da corsa
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30954
Location: here

PostPosted: Mon May 30, 2005 9:03 am    Post subject: Reply with quote

http://www.jguru.com/faq/view.jsp?EID=19660
http://www.csse.monash.edu.au/~lloyd/tildeProgLang/Java/JavaScript/
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
matttions
Guru
Guru


Joined: 19 Jul 2004
Posts: 338

PostPosted: Mon May 30, 2005 10:32 am    Post subject: Reply with quote

.azie per i link :-D
molto useful..
adesso l'ultimo passo ...il maledetto jar netscape.javascript dove lo scarico?

non riesco ad importare la classe
Code:
import netscape.javascript.*

eclipse dice che nn riesce a risolverla...quindi nn è firnita con la 1.4 sdk standard? la devo scaricare ?
per caso è in portage sotto una identità nascosta?
_________________
gentoo ... l'unico pinguino da corsa
Back to top
View user's profile Send private message
matttions
Guru
Guru


Joined: 19 Jul 2004
Posts: 338

PostPosted: Mon May 30, 2005 2:05 pm    Post subject: Reply with quote

risolto :-D

Allora bisogna importare la classe
Code:
import netscape.javascript.*

che trovate nel jre sotto
Code:
/opt/sun-jre-bin-1.4.2.08/lib/plugin.jar


poi creare una JSObject
e da lì utilizzare la funzione eval che pende come argomento una stringa, la valuta e ne restituisce il valore :-D
Code:
public void writeHello() {
       JSObject win = JSObject.getWindow(this);
       win.eval("alert(\"Ciao dal metodo Java\")");   
}


:-D
_________________
gentoo ... l'unico pinguino da corsa
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum