// Get the parent form var parent_form = parent.parent.document.getElementById("instance"); if (parent_form && parent_form.contentWindow) parent_form = parent_form.contentWindow.document; // Get the field and set the value. Use <tag_name>.<property_name> for the query selector. var field = parent_form.querySelector("input.item_number"); field.value = "123";
// Get the parent form var parent_form = parent.parent.document.getElementById("instance"); if (parent_form && parent_form.contentWindow) parent_form = parent_form.contentWindow.document; // Get the field and set the value. Use <tag_name>.<property_name> for the query selector. var field = parent_form.querySelector("input.item_number"); field.value = "123";