D
dan baker
I am pretty much a newbie with javascript, and would like to get a
little clarification on what I can do with an onChange javascript
event handler.
I have a dynamic page I build with perl and print to the browser which
includes some data displayed and edittable in <FORM> elements. There
are a couple areas where I display a message or a calculated total to
the user based on the initial values of some data elements.
I would like to clear or change the "read-only" messages and totals if
certain FORM elements get changed... and am unsure how to approach
this. It looks like if I display the "read-only" information in named
FORM elements I could use onChange event handlers to set the values...
but I don't really want the "read-only" or calculated fields to look
like regular FORM elements or allow editting.
Is there a way to use onChange to either:
- change the text in a specific area of a page that has already been
loaded using document.write() ? I am totally unsure if I have an
inline section of javascript that prints out a variable, and I change
the variable via onChange, if the text displayed would change without
refreshing the page.
- put my "calculated" values in FORM elements that look like they are
"read-only" but still allow me to change using the named object
elements?
thanks,
d
little clarification on what I can do with an onChange javascript
event handler.
I have a dynamic page I build with perl and print to the browser which
includes some data displayed and edittable in <FORM> elements. There
are a couple areas where I display a message or a calculated total to
the user based on the initial values of some data elements.
I would like to clear or change the "read-only" messages and totals if
certain FORM elements get changed... and am unsure how to approach
this. It looks like if I display the "read-only" information in named
FORM elements I could use onChange event handlers to set the values...
but I don't really want the "read-only" or calculated fields to look
like regular FORM elements or allow editting.
Is there a way to use onChange to either:
- change the text in a specific area of a page that has already been
loaded using document.write() ? I am totally unsure if I have an
inline section of javascript that prints out a variable, and I change
the variable via onChange, if the text displayed would change without
refreshing the page.
- put my "calculated" values in FORM elements that look like they are
"read-only" but still allow me to change using the named object
elements?
thanks,
d