squirleegirl
Programmer
Greetings!
I am very unfamiliar with javascript, so please bear with me.
I have an asp page that users enter training downtime in and a comment box for them to explain their downtime. The page is written in asp using standard text fields, text area html code.
I would like to standardize the comments by using the onChange function that when a user enters a value in one of the blocks, then the predefined comment for that blcok is automatically generated into the comments section (a text area). The code I am using is:
function CDT() {
document.SaveForm.DeviceComments.value = "Training lost to unscheduled maintenance due to <ENTER REASON> (ENTER HOURS)"
}
This is being activated with onChange='CDT()' for the block.
This works fine, but it doesn't add the comments to the text area, but rather overwrites what is there. There are several blocks that need to write to the same comments area. How can I get it to just add to the comments section instead of overwriting?
Also, this is a side-note, but thought I would ask anyways. How can I get the predefined comment to have the actual hours (value of the block) to the comment instead of having the user change the <ENTER HOURS> manually? Is there a way to incorporate the request.form into the javascript function?
I'm sure this is simple, but javascript is not a know-how of mine.
Thanks in advance for any advice!
I am very unfamiliar with javascript, so please bear with me.
I have an asp page that users enter training downtime in and a comment box for them to explain their downtime. The page is written in asp using standard text fields, text area html code.
I would like to standardize the comments by using the onChange function that when a user enters a value in one of the blocks, then the predefined comment for that blcok is automatically generated into the comments section (a text area). The code I am using is:
function CDT() {
document.SaveForm.DeviceComments.value = "Training lost to unscheduled maintenance due to <ENTER REASON> (ENTER HOURS)"
}
This is being activated with onChange='CDT()' for the block.
This works fine, but it doesn't add the comments to the text area, but rather overwrites what is there. There are several blocks that need to write to the same comments area. How can I get it to just add to the comments section instead of overwriting?
Also, this is a side-note, but thought I would ask anyways. How can I get the predefined comment to have the actual hours (value of the block) to the comment instead of having the user change the <ENTER HOURS> manually? Is there a way to incorporate the request.form into the javascript function?
I'm sure this is simple, but javascript is not a know-how of mine.
Thanks in advance for any advice!