Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 673
  • Last Modified:

value is null or not an object

when i click on this button i get "value is null or not an object" but im sure the onclick event handler is fine.

onclick="javascript:launchOutlook(this.form.request.value,this.form.title.value,this.form.number.value,this.form.persid.options['this.form.persid.selectedIndex'].value);"

If i remove the part that gets the select box value everything works fine.
0
ellandrd
Asked:
ellandrd
3 Solutions
 
IsisagateCommented:
'this.form.persid.selectedIndex']

change to

'this.form.persid.options.selectedIndex']
0
 
TimCotteeCommented:
onclick="javascript:launchOutlook(this.form.request.value,this.form.title.value,this.form.number.value,this.form.persid.options[this.form.persid.selectedIndex].value);"

Without the ' around the this.form.persid.selectedIndex.
0
 
thirdCommented:
remove the single quote

'this.form.persid.selectedIndex'


<a href="#" onclick="launchOutlook(this.form.request.value,this.form.title.value,this.form.number.value,this.form.persid.options[this.form.persid.selectedIndex].value);return false;">click</a>
0
 
ellandrdAuthor Commented:
thanks!
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now