Hi there, and thanks for reading.
I have a web page with several pairs of controls. They are, in fact, text fields and buttons, the idea being that the button click opens a modal dialog, whose return value is dropped into the text field.
Because I add more and more of these pairs at runtime through client side script, each have button has the same object name and ID, as do the text fields. I scripted the dialog in a test page like this:
window.event.srcElement.form.txt.value = window.showmodaldialog(blah blah)
I.e., the srcElement is the button and I use the form to identify in which object with ID="txt" to place the result. Works fine.
However, now I come to the real page, I have the whole situation already within the main form, and so I cannot use a nested form to effectively group the buttons to their relevant text fields.
I have tried using DIV and Spans, but of course they don't work, so what 'containing' object can I use within a form that will permit the syntax window.event.srcELement.[whatever].txt.value = ResultofmodalDialog?

thank again people....

surrendermonkey

Colon-Hyphen-Close-Bracket