dasteinitz
08-21-2002, 08:18 PM
I would like to make a form that simply take away the border on the textbox when submitted so that a form now looks like a text document and can be printed. Below is a silly example of how it could work (how ever it does not). Thank you for any help. Daniel
<html>
<head>
<title>A Very Simple Calculator</title>
<script language = "JavaScript">
<!-- hide me from old browsers
function multiplyTheFields()
{
var number_one = window.document.the_form.field_one.value;
var number_two = window.document.the_form.field_two.value;
window.document.the_form.field_one.border=0; //these are things I have tried and do not work
window.document.the_form.field_two.style='border-style: none';
var product= number_one * number_two;
alert(number_one + " times " + number_two + " is: " + product);
}
// end hiding comment -->
</script>
</head>
<body>
<form name = "the_form">
Number 1: <input type = "text" name = "field_one" border="15"> <br>
Number 2: <input type = "text" name = "field_two" style='border-style: solid'> <br>
<a href="#" onClick = "multiplyTheFields(); return false;">multiply them!</a>
</form>
</body>
</html>
<html>
<head>
<title>A Very Simple Calculator</title>
<script language = "JavaScript">
<!-- hide me from old browsers
function multiplyTheFields()
{
var number_one = window.document.the_form.field_one.value;
var number_two = window.document.the_form.field_two.value;
window.document.the_form.field_one.border=0; //these are things I have tried and do not work
window.document.the_form.field_two.style='border-style: none';
var product= number_one * number_two;
alert(number_one + " times " + number_two + " is: " + product);
}
// end hiding comment -->
</script>
</head>
<body>
<form name = "the_form">
Number 1: <input type = "text" name = "field_one" border="15"> <br>
Number 2: <input type = "text" name = "field_two" style='border-style: solid'> <br>
<a href="#" onClick = "multiplyTheFields(); return false;">multiply them!</a>
</form>
</body>
</html>