C
Charles M. Fish, Sr.
I’m so tired from banging this problem around all day, I hope I can
explain it succinctly & accurately.
I want to execute a function immediately following a click on <input
type="RESET"...
The function will insert today’s date into a <input type="TEXT"… field.
It does it just fine with <form onload="insertDate();" where inside the
‘insertDate’ fn, I have document.form.dateField.value = dateString. The
closest I’ve been able to do anything to repopulate <input type=”TEXT”
name=”dateField”… is with the onMouseOut event handler associated with
the <input type=”RESET”… object. Aaarrghh!
Here’s kind of an example:
<script>
// global var
var dateString = ""
function insertDate()
{
// …code that assigns formatted string for today’s date
dateString = dayname[weekday]+" "+day+" "+monthname[month]+" "+year;
}
</script>
</head>
<body...
<form onLoad="insertDate();"...
<input type=”text” name=”dateField” readonly>
..
..
..
<input type="reset" name="reset" value="reset"...
on... I don’t know what (eventHandler) can execute a function call after
RESET is executed>
I’ve even tried a dummy (pseudo) reset where RESET is a mere ‘button’
and I can call any function I want thru the onClick handler; but then
I can’t restore radio buttons to their default (initialized at form
load) values.
Any assistance will be genuinely appreciated!
Maybe you have solutions for both problems (automatic restoration of
dateString following RESET *** AND *** reassigning programmatically the
radio values?!?
beaucoup thanx in advance,
Chuck
==
explain it succinctly & accurately.
I want to execute a function immediately following a click on <input
type="RESET"...
The function will insert today’s date into a <input type="TEXT"… field.
It does it just fine with <form onload="insertDate();" where inside the
‘insertDate’ fn, I have document.form.dateField.value = dateString. The
closest I’ve been able to do anything to repopulate <input type=”TEXT”
name=”dateField”… is with the onMouseOut event handler associated with
the <input type=”RESET”… object. Aaarrghh!
Here’s kind of an example:
<script>
// global var
var dateString = ""
function insertDate()
{
// …code that assigns formatted string for today’s date
dateString = dayname[weekday]+" "+day+" "+monthname[month]+" "+year;
}
</script>
</head>
<body...
<form onLoad="insertDate();"...
<input type=”text” name=”dateField” readonly>
..
..
..
<input type="reset" name="reset" value="reset"...
on... I don’t know what (eventHandler) can execute a function call after
RESET is executed>
I’ve even tried a dummy (pseudo) reset where RESET is a mere ‘button’
and I can call any function I want thru the onClick handler; but then
I can’t restore radio buttons to their default (initialized at form
load) values.
Any assistance will be genuinely appreciated!
Maybe you have solutions for both problems (automatic restoration of
dateString following RESET *** AND *** reassigning programmatically the
radio values?!?
beaucoup thanx in advance,
Chuck
==