I have a function sililar to the one below on one of my pages. It puts
the value of a field on a form into a variable called FieldName:
function checkSomething( ) {
var FieldName = document.frmFor mName.FieldName .value
}
I'd like to reuse the function on a different page (instead of writing
another almost identical script on that page), but I need to change the
name of the field in the script depending on the page that the script is
used on.
How do I change the script so that I can put the script in an includes
file and then pass the name of the field to the script according to the
page that the script is being used?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
the value of a field on a form into a variable called FieldName:
function checkSomething( ) {
var FieldName = document.frmFor mName.FieldName .value
}
I'd like to reuse the function on a different page (instead of writing
another almost identical script on that page), but I need to change the
name of the field in the script depending on the page that the script is
used on.
How do I change the script so that I can put the script in an includes
file and then pass the name of the field to the script according to the
page that the script is being used?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Comment