/ Forside / Teknologi / Udvikling / Java Scripts / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java Scripts
#NavnPoint
molokyle 5410
Klaudi 2799
smorch 2439
kim 1360
Harlekin 1134
bentjuul 984
gibson 800
severino 695
Random 675
10  konsulent.. 626
java applet linked to colour changer
Fra : Terri


Dato : 22-12-02 02:44

I have a colour changer on my website and I have a clock that is a java
applet... the background on the clock is white and the colour changer on my
page lets me change the background on the page to different colors...I was
wondering if there is a way to link the clock to the changer so that when i
choose a colour it will also change the colour on the background of the
clock?

I know there is a way you can link it together, at least I am pretty sure
there should be a way since you cant make transparent applets.

Any advice would be greatly appreciated

Thanks alot,

Terri





 
 
Lasse Reichstein Nie~ (22-12-2002)
Kommentar
Fra : Lasse Reichstein Nie~


Dato : 22-12-02 11:46

"Terri" <terri.long@dsl.pipex.com> writes:

> I have a colour changer on my website and I have a clock that is a java
> applet... the background on the clock is white and the colour changer on my
> page lets me change the background on the page to different colors...I was
> wondering if there is a way to link the clock to the changer so that when i
> choose a colour it will also change the colour on the background of the
> clock?

It is possible, but it needs to be programmed into the Java class.

If the Java object is included in the HTML page using the applet tag,
you can access the public fields of the Java object as properties
of the applet element. You could then have a public field containing
the background color, and change it when you change the page background ...
although the will probably be a small, but visible, delay.

If you include the Java object using the object tag, I don't know
if there is a similar way to access the Java object. However, the
Java object can access the JavaScript DOM structure as explained at
<URL:http://java.sun.com/products/plugin/1.3/docs/jsobject.html>.

/L
--
Lasse Reichstein Nielsen - lrn@hotpop.com
'Faith without judgement merely degrades the spirit divine.'

Terri (22-12-2002)
Kommentar
Fra : Terri


Dato : 22-12-02 15:56

Thanks alot for the info, I will give it a try and let you know how it
went...

Thanks again,

Terri
"Lasse Reichstein Nielsen" <lrn@hotpop.com> wrote in message
news:r8capc0r.fsf@hotpop.com...
> "Terri" <terri.long@dsl.pipex.com> writes:
>
> > I have a colour changer on my website and I have a clock that is a java
> > applet... the background on the clock is white and the colour changer on
my
> > page lets me change the background on the page to different colors...I
was
> > wondering if there is a way to link the clock to the changer so that
when i
> > choose a colour it will also change the colour on the background of the
> > clock?
>
> It is possible, but it needs to be programmed into the Java class.
>
> If the Java object is included in the HTML page using the applet tag,
> you can access the public fields of the Java object as properties
> of the applet element. You could then have a public field containing
> the background color, and change it when you change the page background
....
> although the will probably be a small, but visible, delay.
>
> If you include the Java object using the object tag, I don't know
> if there is a similar way to access the Java object. However, the
> Java object can access the JavaScript DOM structure as explained at
> <URL:http://java.sun.com/products/plugin/1.3/docs/jsobject.html>.
>
> /L
> --
> Lasse Reichstein Nielsen - lrn@hotpop.com
> 'Faith without judgement merely degrades the spirit divine.'



Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408849
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste