M
Mitch Edelman
I am writing a validation function: what I want to do
when an error is detected is to open a second
window containing error messages.
The form being validated is rather long, and there
are several points in the code where I write the
messages. So, I would like to have a separate function
just to open the second window with an appropriate
title (something like "the following errors were
detected in your form").
(something labout like this:
function validate(this){
var headerWritten = false;
....
//when I trap an error (done in many places)
if (!headerWritten){
OpenSecondWindow(secondWindow, secondWindowDocument);
headerWritten=true;
}
secondWindowDocument.write('apporpriate error message');
My problem: secondWindow and secondWindowDocument seem to need
to be passed as references to this OpenSecondWindow
function - how to do this???????
Of course, if you know of an easier way to do this, I'd be
grateful if you'd pass that bit of knowledge along ...
Thanks in advance.
Mitch Edelman
when an error is detected is to open a second
window containing error messages.
The form being validated is rather long, and there
are several points in the code where I write the
messages. So, I would like to have a separate function
just to open the second window with an appropriate
title (something like "the following errors were
detected in your form").
(something labout like this:
function validate(this){
var headerWritten = false;
....
//when I trap an error (done in many places)
if (!headerWritten){
OpenSecondWindow(secondWindow, secondWindowDocument);
headerWritten=true;
}
secondWindowDocument.write('apporpriate error message');
My problem: secondWindow and secondWindowDocument seem to need
to be passed as references to this OpenSecondWindow
function - how to do this???????
Of course, if you know of an easier way to do this, I'd be
grateful if you'd pass that bit of knowledge along ...
Thanks in advance.
Mitch Edelman