Re: SELECT options is null or not an object

From: Date: Thu, 08 Feb 2001 08:53:09 +0000
Subject: Re: SELECT options is null or not an object
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38721@lists.php.net to get a copy of this message
SELECT options is null or not an object > Does anyone know why I get this error when selecting an option in the box? I think that's a JavaScript error message, no?... In a popup window rather than in the middle of your page... > <script language=javascript> > <!-- > function getDocID(form) > > var list = document.docIDchange.useCaseSelected; > alert('list '+list); Ah, yes. *Here* you try to dig down into the form object to get your DocID: > var docID = list.options[list.selectedIndex].value; And *here* you also try to dig down into the form object to get your DocID: > onChange=\"getDocID(this.options[this.selectedIndex].value)\" SIZE=5>\n"; You should only be doing all that this.options[this.selectedIndex].value in *one* of the two places. I'd put it in the function, myself. YMMV. It's a religious issue. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#38721) next »