hi all!
i have a question.
i want to add an img to a specific cell in a table(which is inside a form) with inside a javascript function.
(i greened which function i use, which cell i want, and which img i want)
this is the code i write so far:
<html>
<head>
<title>Black Jack</title>
<link rel="stylesheet" type="text/css">
<Script Language="JavaScript">
var h;
[B]function hit(f,i)[/B]{
var cards = new Array();
cards[0]="./Cards/cl1.gif";
h=f.money.value;
f.money.value = h-i;
h=f.money.value;
}
function reset(f)
{
f.money.value=4000;
alert("bla bla");
}
</Script>
<style type="text/css">
.buttonStyle1 {
background-color:#FFF;
background-image:url(c255.jpg);
width:40%;
height:92%;
}
.buttonStyle2 {
background-color:#FFF;
background-image:url(c50.jpg);
width:80%;
height:92%;
}
.buttonStyle3 {
background-color:#FFF;
background-image:url(c100.jpg);
width:80%;
height:92%;
text-align:center;
}
</style>
</head>
<body>
<form name="bj">
<table width="100%" height="100%" border="1">
<tr align="center" height="25%">
<td>Money:<input name="money" value="4000" type="text" size="4" /> $</td>
<td><input type="button" name="c25" class="buttonStyle" value="stam" /></td>
<th> </td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td></td>
</tr>
<tr align="center" height="25%" width="100%">
<td width="30%"><input type="button" name="c25" class="buttonStyle1" onClick="hit(this.form,25);"/></td>
<td width="15%"><input type="button" name="c50" class="buttonStyle2" onClick="hit(this.form,50);"/></td>
<td width="15%"><input type="button" name="c100" class="buttonStyle3" onClick="hit(this.form,100);"/></td>
<td><input type="button" value="Hit Me" onClick= "hit(this.form,100);"/></td>
<td><input type="button" value="Hold" /></td>
<td><input type="button" value="Deal Again" onClick="reset(this.form);" /></td>
</tr>
</table>
</form>
</body>
</html>
is it possible to do something like that?