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"
But I got no errors if I replace obj.className="yenformat"; with
alert(obj.className) ... I 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>
........
<select class='dollarformat' name='currency'
onChange='ClassName(Form.currency.value);' >
<option value='PHP' selected >PHP</option>
<option value='USD' >USD</option>
<option value='JPY' >JPY</option>
</select>
.........
what went wrong with the code but everytime I selected the JPY option,
I got this Error: "Your computer has executed an illegal operation"
But I got no errors if I replace obj.className="yenformat"; with
alert(obj.className) ... I 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>
........
<select class='dollarformat' name='currency'
onChange='ClassName(Form.currency.value);' >
<option value='PHP' selected >PHP</option>
<option value='USD' >USD</option>
<option value='JPY' >JPY</option>
</select>
.........