lingra
09-02-2003, 09:45 AM
if I hard code the code in the input statement:
<INPUT TYPE="text" NAME="currsymbol" value="& #8364;" readonly>
it prints the symbol, but when I try to assign the value from a javascript, it shows the code "& #8364;" (space added so the code would show.
In this code the part1 shows the symbol, part2 shows the code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="formx">
<input type="text" name="part1" value="& #8364;">
<input type="text" name="part2" >
</form>
<script language=javascript>
document.formx.part2.value="& #8364;";
</script>
</body>
</html>
I need to be able to assign the currency symbol depending on whether it is a pound, euro, dollar, etc.
How do you do this in javascript?
<INPUT TYPE="text" NAME="currsymbol" value="& #8364;" readonly>
it prints the symbol, but when I try to assign the value from a javascript, it shows the code "& #8364;" (space added so the code would show.
In this code the part1 shows the symbol, part2 shows the code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="formx">
<input type="text" name="part1" value="& #8364;">
<input type="text" name="part2" >
</form>
<script language=javascript>
document.formx.part2.value="& #8364;";
</script>
</body>
</html>
I need to be able to assign the currency symbol depending on whether it is a pound, euro, dollar, etc.
How do you do this in javascript?