Need help with accessing form elements

Hello,

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 javascript:window.open(), however this does not work here.

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

document.getElementById('formFieldId').value='whatever'
or
document.forms[0].fieldName.value='whatever'
there is no opener
0
 
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
0
 
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.
0
 
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

0
All Courses

From novice to tech pro — start learning today.