obj.className="yenformat";

I

IveCal

Hello, I have the code below. I'm new in DHTML/DOM/etc. I dont know
what went wrong with the code but everytime I selected the JPY option,
I got this Error: "Your computer has executed an illegal operation.
Application will terminate."
But I got no errors if I replace obj.className="yenformat" with
alert(obj.className) ... It returned the right currency format which
is
dollarformat. Please help...

-------------------------------------------

<head>
.....
function ChangeClass(currency)
{
if(currency == "JPY")
{
var obj = document.getElementById("credit");
obj.className="yenformat";
}
}

.....
</head>

........




<input id="credit" name="credit" type="text" class='dollarformat'>
....
<select name='currency'
onChange='ClassName(Form.currency.value);' >
<option value='PHP' selected >PHP</option>
<option value='USD' >USD</option>
<option value='JPY' >JPY</option>
</select>
 
Top