Click to See Complete Forum and Search --> : Java script for On click of a button to call an applet


kkarth
07-07-2003, 09:07 AM
Hi,

My web page displays an image(640X380) using applet.
On Click of a button I need to display (320X240) in the same place. How do I write a JavaScipt for this.
Thanks
Karthey


<HTML>
<HEAD>
<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
<script id="clientEventHandlersJS" language="javascript">


function Button1_onclick() {

}

</HEAD>
<body>
<P>&nbsp;</P>
<P>
<INPUT id="Button1" type="button" value="320X240" name="medimg" onclick="return Button1_onclick()"></P>
<table width="714" ID="Table1">
<tr>
<td width="640" height="480" rowspan="6"><APPLET id="Applet1" style="WIDTH: 640px; HEIGHT: 480px" height="480" width="483" align="top" code="CamView.class" name="CamViewApplet" viewastext>
<PARAM NAME="imagefile" VALUE="<%=imageFile%>">
</APPLET>
</td>
</tr>
</table>
</body>
</HTML>

Khalid Ali
07-07-2003, 11:55 AM
What you can do is remove or hide the applet element,if you want applet to be hidden use
display:none
CSS property and then create an image at that location..
var img = document.createElement("img")

img.setAttribute("src","imge.gif");

and then append this to the parent element