[thelist] pass by value in JavaScript?
Feingold Josh S
Josh.S.Feingold at irs.gov
Thu Apr 25 13:18:02 CDT 2002
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
> Is there a way to pass by value, or to copy an object?
You can pass a value like this:
document.form1.select.options[1].value =
document.form2.select.options[1].value
You can pass the text seen by the user like this:
document.form1.select.options[1].text =
document.form2.select.options[1].text
Or you can pass both, using both lines. However, I don't know that this is
"prettier" than creating a new Options object.
Josh
More information about the thelist
mailing list