Need help with accessing form elements


I am using the script in the URL I provided.
I open a modal message, and I need to change some values in a form in the document that opened the modal message depending on selection I make within the modal window.
How do I do that?  
Basically I am trying to do the same thing as wen trying to access elements of a parent window when using, however this does not work here.

Who is Participating?
Michel PlungjanConnect With a Mentor IT ExpertCommented:
just use

there is no opener
spairusAuthor Commented:
Hello mplungjan,

Thats exactly what I was trying to do, but I get the message that document.formname has no properties, although it does exist
spairusAuthor Commented:
You were right, document.getElementById('formFieldId').value='whatever' did work. I don't know why using document.forms[0].fieldName.value='whatever' doesent work, but it doesent matter. Thnx.
Michel PlungjanIT ExpertCommented:
Perhaps the field is not in the form?
I said document.forms[0] and you said document.formname has no properties....

so how did you access it and how does the form tag look like?
And does the field have a name or only an ID

All Courses

From novice to tech pro — start learning today.