Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

4409723

Suspended
Original poster
Jun 22, 2001
2,221
0
Just been working on a little project for university and doing some research. We are incorporating some java applets and a couple of movies. We have a page of demos, so rather than bog down the users webpage by loading them all is there a way to have say an image preview of the applet and then have the applet load when the user clicks the image?

Thanks for any help!

EDIT: Sorted my problem out with the embedding of movies, just java applets now.
 

angelneo

macrumors 68000
Jun 13, 2004
1,541
0
afk
Well, you could have a javascript that will loads the applet once the image is clicked, e.g
Code:
function loadapplet() {
    document.getElementBy['div_holder'].innerHTML = '<APPLET id="appletname" name="appletname" code="applet.class" mayscript archive="applet.jar" width="100" height="100">'
}

on the image tag
Code:
<img src="ppp.jpg" onClick="loadapplet()" style="cursor:pointer;" />

Did not test it yet, but technically, it should work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.