Hvordan laver jeg en APPLET med DHTML?
Jeg vil gerne oversætte denne statiske APPLET :<APPLET ID="AP1"
CODEBASE="http://sasweb/sasweb/graph"
CODE="GraphApplet.class"
ARCHIVE="graphapp.jar"
MAYSCRIPT
class="Graph"
Width=680px
Height=360px
Align=TOP
>
<PARAM NAME="DISABLEDRILLDOWN" VALUE="Y">
<PARAM NAME="BACKCOLOR" VALUE="WHITE">
<PARAM NAME="HoldDisplay" VALUE="1">
Sorry, there was a problem displaying the applet in your browser.
</APPLET>
til en genereret under javascript-kontrol (DHTML):
Applet=document.createElement("APPLET");
Applet.setAttribute("id","AP1")
Applet.codeBase="http://sasweb/sasweb/graph";
Applet.code="GraphApplet.class";
Applet.archive="graphapp.jar";
Applet.className="Graph";
Applet.width="680px"
Applet.height="360px"
Applet.align="TOP"
Param=document.createElement("PARAM");
Param.mame="DISABLEDRILLDOWN"
Param.value="Y";
Applet.appendChild(Param)
Param=document.createElement("PARAM");
Param.mame="BACKCOLOR"
Param.value="WHITE";
Applet.appendChild(Param)
Param=document.createElement("PARAM");
Param.mame="HoldDisplay"
Param.value="1";
Applet.appendChild(Param)
docBody = document.getElementsByTagName("body").item(0);
docBody.replaceChild(Applet,AP1);
Men det virker ikke. Bl.a. p.g.a. af APPLET ikke har
en appendChild-metode.
Det jeg gerne vil er, at kunne replace applet'en med
javascript for at kunne skifte en graf ud alt efter
hvad der klik'es på.
