Member Avatar for feoperro

Hi,

I have a javascript function that sets the value of an input area on my page. I need to update the function so that it also sets the value of the input area on a separate page. Currently, I am using a frameset, so I can see both pages simultaneously, but I cannot change the value of the upper page from the lower page which contains the script to update the input areas.

Here is my code:

document.lowerForm.inputOne.value = myVar; //Successfully Updates Input Area.
document.upperForm.inputTwo.value = myVar; //Cannot find specified form and input area.

Thanks,
-Ashton

Member Avatar for feoperro

Nevermind noobs, I found out how to do this! :)

Here is the code:

parent.FRAME_NAME.document.FORM_NAME.INPUT_AREA_NAME.value = VARIABLE_NAME; //Or Hardcode a number/string/boolean, etc instead of using a VARIABLE_NAME.

the code for your question

parent.FRAME_NAME.document.FORM_NAME.INPUT_AREA_NAME.value = VARIABLE_NAME; //Or Hardcode a number/string/boolean, etc instead of using a VARIABLE_NAME.
check it out..

Member Avatar for feoperro

Thanks for answering my thread with my own answer Vincent :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.