SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Sep 28, 2006, 19:48 #1
- Join Date
- Sep 2006
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Using Javascript with Java Applets
What i am intending on doing is having two buttons and java applet. I want to have it so when you click a button it changes to another applet, and then when you click the other button, it goes to the original appet. how would i do this?
this is my code and so far it doesnt work
PHP Code:<div align="center">
<input name="Button" type="button" onclick="document.getElementByID('applet1').style.display='none';document.getElementByID('applet2').style.display='block';" value="Hell of Sand" />
<input name="button2" type="button" onclick="document.getElementByID('applet1').style.display='block';document.getElementByID('applet2').style.display='none';" value="Pyro Sand" />
<div id="applet1">
<applet code="Falling_Sand_Game" width=520 height=460 archive="fsg_small.mp3"></applet>
</div>
<div id="applet2">
<applet code="HellOfSand" style="display:none" width=520 height=460 archive="HellOfSand.jar"></applet>
</div>
-
Sep 29, 2006, 00:05 #2
- Join Date
- Mar 2004
- Posts
- 1,647
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
getElementById
cheers
-
Sep 29, 2006, 04:40 #3
- Join Date
- Sep 2006
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thx
Last edited by Alphamonkey; Sep 30, 2006 at 06:58.
Bookmarks