Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1371 how can I add a new option to a form select field in the current windows opener?

You are here: irt.org | FAQ | JavaScript | Form | Q1371 [ previous next ]

The following *should* work in JavaScript 1.1 enabled browsers:

<script language="JavaScript"><!--
var optionName = new Option(text, value, false, false)
var selectLength = opener.document.formName.selectName.length;
opener.document.formName.selectName.options[selectLength] = optionName;//--></script>

Feedback on 'Q1371 how can I add a new option to a form select field in the current windows opener?'

©2018 Martin Webb