Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Form | Q1371 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.